diff --git a/src/codecs/music_gme.c b/src/codecs/music_gme.c index 27696e8ab..1f06522e1 100644 --- a/src/codecs/music_gme.c +++ b/src/codecs/music_gme.c @@ -235,7 +235,7 @@ static void *GME_CreateFromRW(struct SDL_RWops *src, int freesrc) SDL_RWseek(src, 0, RW_SEEK_SET); mem = SDL_LoadFile_RW(src, &size, SDL_FALSE); if (mem) { - err = gme.gme_open_data(mem, size, &music->game_emu, music_spec.freq); + err = gme.gme_open_data(mem, (long)size, &music->game_emu, music_spec.freq); SDL_free(mem); if (err != 0) { GME_Delete(music); @@ -309,13 +309,13 @@ static int GME_GetSome(void *context, void *data, int bytes, SDL_bool *done) return 0; } - err = gme.gme_play(music->game_emu, (music->buffer_size / 2), (short*)music->buffer); + err = gme.gme_play(music->game_emu, (int)(music->buffer_size / 2), (short*)music->buffer); if (err != NULL) { Mix_SetError("GME: %s", err); return 0; } - if (SDL_AudioStreamPut(music->stream, music->buffer, music->buffer_size) < 0) { + if (SDL_AudioStreamPut(music->stream, music->buffer, (int)music->buffer_size) < 0) { return -1; } return 0; diff --git a/src/codecs/music_minimp3.c b/src/codecs/music_minimp3.c index fee999076..8565996cb 100644 --- a/src/codecs/music_minimp3.c +++ b/src/codecs/music_minimp3.c @@ -173,7 +173,7 @@ static int MINIMP3_GetSome(void *context, void *data, int bytes, SDL_bool *done) return 0; } - amount = mp3dec_ex_read(&music->dec, music->buffer, music_spec.samples * music->channels); + amount = (int)mp3dec_ex_read(&music->dec, music->buffer, music_spec.samples * music->channels); if (amount > 0) { if (SDL_AudioStreamPut(music->stream, music->buffer, (int)amount * sizeof(mp3d_sample_t)) < 0) { return -1;