I tested FMOD Studio API on my phone but when using AAudio, the app crashed.
The audio suddenly stopped.
The timing was very random but mostly happened within 20 seconds.
Whenever the audio stopped, I got the below Logcat message.
E | AAudio | stream not closed, in state 3
- When the above happened, the app crashed within around 30 seconds.
This timing was also irregular.
Test Environment :
- 6/9/19 2.00.04 - Studio API minor release (build 104705)
- Android Studio 3.4.2 | Visual Studio 2019 | Windows 10 64bit Professional
- Samsung Galaxy S7 Edge (Android 8.0, 64bit, with all the latest software updates by Samsung)
- Tested both libfmod.so and libfmodL.so.
- ARM and ARM64 builds using both Debug and Release mode.
- Audio Source File : MP3, 44100Hz, Stereo, 16bit, 192kbps, 00:03:56, 5.42MB
Doesn’t happen with OpenSL ES output mode.
Calling FMOD_System_SetOutput(FMOD_OUTPUTTYPE_AAUDIO) or not calling FMOD_System_SetOutput() at all causes the issue.
Java and C source files have the basic minimum code.
Only FMOD_System_PlaySound() was called ONCE.
Tested using default settings.
Sample rate, buffer size… Didn’t touch anything.
There are NO DSPs.
FMOD API was used on a newly created native worker thread, but, of course, that was after being attached to JVM.
Happened while in the foreground.
Called org.fmod.FMOD.init(this) properly.
To give FMOD System enough time, I even put a 20 second delay after System.loadLibrary(“fmod”) and org.fmod.FMOD.init(this) calls.
Tried FMOD_CREATESAMPLE, FMOD_CREATESTREAM, and FMOD_CREATECOMPRESSEDSAMPLE.
Tried with other audio files but still the same.