Jump to content
  • Advertisement
Sign in to follow this  
mike4linux

sdl_mixer sound attenuation/fade in/out

This topic is 2992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi what am i doing wrong. I get no attenuation/fade in/out on my sound. Always full volume or no sound at all. Many thanks Michael ------------ channel = Mix_PlayChannel(0, sound, -1); if(channel == -1) { XPLMDebugString(Mix_GetError()); } if (dis>=255){ dis = 255; } if (dis<=1){ dis = 1; } if(!Mix_SetDistance(0, dis)) { XPLMDebugString(Mix_GetError()); }

Share this post


Link to post
Share on other sites
Advertisement
Have you checked with the debugger what is the value of dis when calling Mix_SetDistance?

Also, it would be worth trying to use the channel returned by Mix_PlayChannel(), even though it should be 0, I am not sure if Mix_PlayChannel would use another channel under some circumstances.

Other than that, I see no reason why this shouldn't work.

Share this post


Link to post
Share on other sites
ok i found out that sound gets muted by the parent application at a specific distance. I'm only doing a plugin. Any idea on how i could get around this sound muting? 3D sound is fine but suddenly muted while moving away with the listener.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!