5
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

8
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\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\$ Commented Sep 27, 2012 at 0:44
  • \$\begingroup\$ @GustavoMaciel done :) \$\endgroup\$
    – NewProger
    Commented Oct 7, 2012 at 8:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .