Skip to content

Commit

Permalink
Fixed Visual Studio warnings
Browse files Browse the repository at this point in the history
(cherry picked from commit acdd059)
  • Loading branch information
slouken committed Jan 21, 2024
1 parent 9fc3ead commit 85db05d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/codecs/music_gme.c
Expand Up @@ -238,7 +238,7 @@ static void *GME_CreateFromRW(struct SDL_RWops *src, SDL_bool freesrc)
SDL_RWseek(src, 0, SDL_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);
Expand Down Expand Up @@ -312,13 +312,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_PutAudioStreamData(music->stream, music->buffer, music->buffer_size) < 0) {
if (SDL_PutAudioStreamData(music->stream, music->buffer, (int)music->buffer_size) < 0) {
return -1;
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/codecs/music_minimp3.c
Expand Up @@ -172,7 +172,7 @@ static int MINIMP3_GetSome(void *context, void *data, int bytes, SDL_bool *done)
return 0;
}

amount = mp3dec_ex_read(&music->dec, music->buffer, 4096/*music_spec.samples*/ * music->channels);
amount = (int)mp3dec_ex_read(&music->dec, music->buffer, 4096/*music_spec.samples*/ * music->channels);
if (amount > 0) {
if (SDL_PutAudioStreamData(music->stream, music->buffer, (int)amount * sizeof(mp3d_sample_t)) < 0) {
return -1;
Expand Down

0 comments on commit 85db05d

Please sign in to comment.