Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RogerGuard

DirectSound

This topic is 5912 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

I have noticed that when the window created by my application which utilizes DirectSound loses focus the sounds will be muted, then once focus is returned to this window the sounds are un-muted. Are there ways to not mute the sounds when the window loses focus? Roger Printy Software Engineer

Share this post


Link to post
Share on other sites
Advertisement
Huh? That muting doesn''t seem to happen to me. What *exactly* are you using? DirectX 7? 8? What kind of interfaces, etc, are you using?

Share this post


Link to post
Share on other sites
I tried adding this flag but the call to CreateSound Buffer then fails. I am using the following flags:

DSBCAPS_CTRL3D | DSBCAPS_PRIMARYBUFFER | DSBCAPS_GLOBALFOCUS

Code is as follows:
DSBUFFERDESC buffDescrip;
memset (&buffDescrip, 0x00, sizeof (DSBUFFERDESC));
buffDescrip.dwSize = sizeof(DSBUFFERDESC);
buffDescrip.dwFlags = DSBCAPS_CTRL3D | DSBCAPS_PRIMARYBUFFER | DSBCAPS_GLOBALFOCUS;

// Create the sound buffer & capture the 3d interface
if FAILED(m_lpDS->CreateSoundBuffer (&buffDescrip, &lpPrimaryBuf, NULL))
{
err = DS_FAILED;
}

Share this post


Link to post
Share on other sites
I was just about to post that I took care of the problem. I was applying the flags to the primary buffer, once I switched to applying them to the secondary buffers that are created for each handled sound the problem disappeared and it is running as intended. Thank you everyone for you assistance.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!