Upgraded to 3.5.1 today (develop branch) to fix this old crash problem...
Microsoft.Xna.Framework.Audio.NoAudioHardwareException: No audio hardware available
... but upgrading to 3.5.1 has ended up causing more issues.
Sound Effect instances only seem to play occasionally and if I repeatedly spam a button (so the SFX plays a few times) it will eventually crash here in SoundEffectInstance.OpenAL.cs:
AL.Source (SourceId, ALSource3f.Position, _pan, 0, 0.1f);
ALHelper.CheckError("Failed to set source pan.");
With the reason that it has 'Invalid Value'.
Any ideas what might cause this? The sound effect always plays the first time its supposed to play but most subsequent times its just silence until the eventual crash.
Here is the method in my AudioManager where the sound effect is handled:
Sounds = new Queue<SoundEffectInstance>(5);
private static void AddSound(SoundEffect sound)
SoundEffectInstance handle = sound.CreateInstance();