[SDL] Fading sound to a specific volume

Ryan C. Gordon icculus at clutteredmind.org
Sun Mar 20 16:50:20 PST 2005


Gabriel wrote:
> SDL_Mixer provides functions to fade in or out a channel in a specific
> time (Mix_FadeOutChannel() and Mix_FadeInChannel()). Is there a way to
> change the volume of a sample gradually, but not necessarily to zero?

Use Mix_Volume() and track it yourself...SDL_mixer doesn't have this 
functionality exposed in the API (although it's trivial to do, as 
SDL_mixer's Fade functions show).

--ryan.





More information about the SDL mailing list