Set music volume
The previous volume setting.
Set the volume to volume, if it is 0 or greater, and return the previous volume setting. Setting the volume during a fade will not work, the faders use this function to perform their effect! Setting volume while using an external music player set by Mix_SetMusicCMD will have no effect, and Mix_GetError will show the reason why not.
Binds to C-function in SDL_mixer.h
int Mix_VolumeMusic(int volume)
// set the music volume to 1/2 maximum, and then check it printf("volume was : %d\n", Mix_VolumeMusic(MIX_MAX_VOLUME/2)); printf("volume is now : %d\n", Mix_VolumeMusic(-1));
SdlMixer Class | Tao.Sdl Namespace | Mix_FadeInMusic | Mix_FadeOutMusic | Mix_SetMusicCMD