Quick question:

I have a SoundEffect instance, and I would like to know if it is playing at the moment or not. But there's neither a method, nor a property that would allow to check it...

So, is there a way to know it?


Found the answer myself :)

Apparently you have to do this:

SoundEffectInstance qwe = yourSound.CreateInstance();
qwe.State ...

And that state will contain... well, the state of the sound. Also SoundEffectInstance countains bunch of other useful data.

| improve this answer | |
  • \$\begingroup\$ Yes, you have to create instances, this way you have more control of your sounds. And also, can you accept your own answer? For marking it as answered. \$\endgroup\$ – Gustavo Maciel Sep 27 '12 at 0:44
  • \$\begingroup\$ @GustavoMaciel done :) \$\endgroup\$ – NewProger Oct 7 '12 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.