SDL_mixer icon indicating copy to clipboard operation
SDL_mixer copied to clipboard

Mix_GetMusicVolume behavior vs existing APIs

Open icculus opened this issue 3 years ago • 0 comments

Mix_Volume sets the volume for a specific channel, and can be used to query the current volume, too. Mix_MusicVolume sets the volume for the music "channel," like Mix_Volume does for chunk channels. Mix_VolumeChunk sets the volume for a specific chunk, separate from the channel.

Mix_GetMusicVolume gets the volume of a specific music object...but there does not appear to be a way to set this for a specific music object.

I think the way this currently works is that Mix_MusicVolume sets this for the music channel, and that value propagates to the currently playing music object. If later you start a different piece of music, you can use Mix_GetMusicVolume to query the no longer playing music's volume...?

I am right about that? If so, we should probably make this work like Mix_VolumeChunk, where you can directly set a music object's volume separate from the music "channel," and setting the channel's volume doesn't change the object's separate volume.

Mix_GetMusicPosition has this same issue.

icculus avatar Jul 01 '22 16:07 icculus