Jump to content
  • Advertisement
Sign in to follow this  
Endurion

DirectSound, MOD Player, Sticky Focus

This topic is 4944 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, i implemented a nice sound system and an additional MOD player. The player uses Multimedia timers for exact playback. Everything works nice and dandy. On loosing focus the music stops playing and resumes on getting the focus again. With one ugly addition: The volume of the currently playing sound buffers is suddenly at full 100%. When the player reaches the next MOD tick the volume gets set right again. This is a bit annoying; the basic volume can be adjusted (all the sound buffers get the channel volume modulated with the master volume). If i set my master volume to 0 (master volume inside the sound system, not global) i don't hear anything, but on getting focus again the sounds play as if full volume was set. I'm using the following buffer caps on creating a buffer: DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_STICKYFOCUS; I'm not creating a primary buffer myself, DirectSound creates one internally. I don't have any activating handling in my sound class, so it's not me setting the volume on being activated. What could be wrong? Sound buffers don't get lost (at least i can't see that they are lost). I'm using LPDIRECTSOUND (the oldest version). Thanks in advance on any hints!

Share this post


Link to post
Share on other sites
Advertisement
I probably have to do that, it's just weird that something is messing with my volume.

Now i have to add an activation event to the sound system. Yay. Programming would be boring if it weren't for those moments.

Thanks anyway :)

Rating++

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!