Play paused sound effect


I’m facing issues with Sound Effect Instance. When I pause sound with SoundEffectInstance.Pause(), then when I call SoundEffectInstance.Play() nothing happends. It is possible to resume this sound with SoundEffectInstance.Resume() method but I would like to play this sound from the beggining. Is it known issue ? Any workaround for this ? I’m also combining this sound with IsLooping property (but I don’t know if it matters).

If you want to play the sound from the beginning, call Stop() before calling Play().

Can I operate on sounds synchronously ? I mean can I call Stop(), then Play() immediately and the state will always be SoundState.Playing after all? I noticed a bug with SoundEffectInstance. Steps to reproduction:

  1. Play()
  2. Pause()
  3. Stop()
  4. Play()
  5. Pause()
    Expected result: sound should be paused
    Current result: sound is still playing. Could anybody confirm this behavior ? Well, the only way to pause this sound is top call Stop() on it … which is unacceptable.

I think I’m facing issues with sounds because I change their state synchronously. Can I do that safely ?