Creating a SoundEffect object produces an exception on Android 6.0. and 7.1.2 devices, including Amazon Fire HD 8 2018
It seems to produce one of two possible errors:
Microsoft.Xna.Framework.Audio.NoAudioHardwareException: Audio has failed to initialize. Call SoundEffect.Initialize() before sound operation to get more specific errors.
at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.Byte[] buffer, System.Int32 offset, System.Int32 count, System.Int32 sampleRate, Microsoft.Xna.Framework.Audio.AudioChannels channels, System.Int32 loopStart, System.Int32 loopLength) [0x00028] in:0
at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.Byte[] buffer, System.Int32 sampleRate, Microsoft.Xna.Framework.Audio.AudioChannels channels) [0x00000] in:0
or
System.DllNotFoundException: Couldn't initialize OpenAL because the native binaries couldn't be found.
at Microsoft.Xna.Framework.Audio.OpenALSoundController..ctor () [0x00022] in:0
at Microsoft.Xna.Framework.Audio.OpenALSoundController.EnsureInitialized () [0x00014] in:0
at Microsoft.Xna.Framework.Audio.SoundEffect.PlatformInitialize () [0x00000] in:0
at Microsoft.Xna.Framework.Audio.SoundEffect.Initialize () [0x0001d] in:0
at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.Byte[] buffer, System.Int32 offset, System.Int32 count, System.Int32 sampleRate, Microsoft.Xna.Framework.Audio.AudioChannels channels, System.Int32 loopStart, System.Int32 loopLength) [0x00011] in:0
at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.Byte[] buffer, System.Int32 sampleRate, Microsoft.Xna.Framework.Audio.AudioChannels channels) [0x00000] in:0
Does it work on 3.7?
I can鈥檛 confirm as I actually don鈥檛 possess one of the affected devices. This is from live crash reports.
Certainly worked on 3.6.
3.6 was the last error-free version.
Since 3.7 version I always getting random crushes on random devices. And it is always a "openal audio" problem
Duplicate of #6738 I suppose.
I'm gonna keep this one open and close the other one.
This doesn't crash on startup like the other bug but only when trying to instantiate a SoundEffect object. Maybe that's just because 3.8 defers the loading of the openal lib?
Yes, the audio system has been changed so it does not initialize on startup so users can use other audio solutions (like fmod).
The underlying issue is the same.
Are there any docs yet for swapping the audio backend, say for fmod, available @Jjagg as a possible workaround?
According to #6629 the audio is already optional.
Most helpful comment
I can鈥檛 confirm as I actually don鈥檛 possess one of the affected devices. This is from live crash reports.
Certainly worked on 3.6.