Playing sounds causes unwanted pauses

D

Dom

I'm playing sounds from memory but they're causing my game's graphics to
pause. Does anybody know how to get around this ?
Thanks,
Dom
 
S

Steven Licciardi

Are you playing it asynchronously using something like:

PlaySound(bstr, IntPtr.Zero, SND_ASYNC Or SND_MEMORY)

Or are you still getting the delay doing it this way?
Steven
 
H

Henrik Dahl

Dom,

Try to initiate the garbage collector just before, so it will not succeed in
anything while this is going on.


Best regards,

Henrik Dahl
 
H

Henrik Dahl

OK,

In the full framework you may give the time to some other thread, as far as
I remember it's by Thread.Sleep(0). What if you do this just before you
play?


Best regards,

Henrik Dahl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top