Skip to content

Commit

Permalink
Float volume: correct type for SetMasterVolume
Browse files Browse the repository at this point in the history
  • Loading branch information
Starbuck5 committed Dec 28, 2024
1 parent 982b3b5 commit 437c63e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codecs/music_modplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static void MODPLUG_SetVolume(void *context, float volume)
{
MODPLUG_Music *music = (MODPLUG_Music *)context;
music->volume = volume;
modplug.ModPlug_SetMasterVolume(music->file, volume * 256); /* 0-512, reduced to 0-256 to prevent clipping */
modplug.ModPlug_SetMasterVolume(music->file, (unsigned int)(volume * 256)); /* 0-512, reduced to 0-256 to prevent clipping */
}

/* Get the volume for a modplug stream */
Expand Down

0 comments on commit 437c63e

Please sign in to comment.