By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,714 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,714 IT Pros & Developers. It's quick & easy.

directsound and c#.

P: n/a
Hello

I am writing a program that makes and window popup and plays a sound
repeatedly until the user does soemthing. however directsound for some
reason does not play the sound if is does not have focus.

Does anyone know how to get round this ?

thanks in advance.
Kalpesh Modha
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> I am writing a program that makes and window popup and plays a sound
repeatedly until the user does soemthing. however directsound for some
reason does not play the sound if is does not have focus.

Does anyone know how to get round this ?

thanks in advance.
Kalpesh Modha


What is your cooperation level ? i.e. IDirectSound8::SetCooperativeLevel. If
it's DSSCL_NORMAL, it should be working unless another app gets an exclusive
handle on your sound device while you don't have the focus.

Eric Robert
Software Engineer
Nov 15 '05 #2

P: n/a
hello.

it's
CooperativeLevel.Normal

Basically it's the playsound(C#) program that I am testing with which comes
with the DX SDK. If you click else where the sound stops playing.

regards

Kalpesh Modha.

"Eric Robert" <sy******@spam.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I am writing a program that makes and window popup and plays a sound
repeatedly until the user does soemthing. however directsound for some
reason does not play the sound if is does not have focus.

Does anyone know how to get round this ?

thanks in advance.
Kalpesh Modha
What is your cooperation level ? i.e. IDirectSound8::SetCooperativeLevel.

If it's DSSCL_NORMAL, it should be working unless another app gets an exclusive handle on your sound device while you don't have the focus.

Eric Robert
Software Engineer

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.