flibitijibibo / FNA-MGHistory

FNA - Accuracy-focused XNA4 reimplementation for open platforms
http://fna-xna.github.io/
246 stars 37 forks source link

Looping SoundEffectInstances do not automatically play on Resume() #291

Closed AxiomVerge closed 9 years ago

AxiomVerge commented 9 years ago

In XNA (as well as Monogame), I would typically create a looping sound effect instance, Pause() it immediately, and then, when I wanted to play it, call Resume().

In FNA, it appears necessary to call Play() before calling Resume(). For example,

mSoundEffect = content.Load<SoundEffect>("Audio/SoundEffects/" + name);
SoundEffectInstance instance = mSoundEffect.CreateInstance();
instance.IsLooped = true;
instance.Pause();
instance.Play();     //Required in FNA but not XNA or Monogame
instance.Resume();  //Used to be all that was needed to play a looped SoundEffectInstance

This is not a critical issue for me but it would be good to have the behavior match XNA for others newly porting their projects over.

flibitijibibo commented 9 years ago

This should be fixed, let me know if it isn't:

https://github.com/flibitijibibo/FNA/commit/b4f462ca1e390ef0f40fc4ee84e4ac138a1e684e