Using low level API on a Galaxy S4, and OpenSL output (I set output to Auto-detect), I get “patchy” sound. If I change the output to Audio Track, then sounds perfectly. Is it safe to use Audio Track output in all Android devices? What can happen if I use Audio Track output for all Android devices?
Note: Using FMOD 1.07.06 worked perfectly using Auto-detect output. But after update to 1.08.09, I’m getting such crackling sound when I use Auto-detect in Galaxy S4 with Android 5.
Can you link with the logging version of FMOD and provide the LogCat output as part of your question?
The difference between 1.07 and 1.08 regarding auto detect would cause 1.07 to use AudioTrack and 1.08 to use OpenSL. You may have found a case where the detection is incorrect, that being said I’ve tested here with our Galaxy S4 running Android 4.3 and playback is smooth in the examples. Can you confirm this on your end with Android 5.0 and our play_stream example?.
Using AudioTrack on all Android devices is safe, but it means you’ll lose the ability to record from the microphone and you will get higher latency.
Thanks for that, this just highlights the terrible situation of audio on Android. The device is reporting a buffer size of 512 samples, but in practice requires over 2000. To be fair, the device does say it doesn’t support low latency and FMOD ignored that. I’ll need to make the requirements for OpenSL selection stricter for our next release.