CRASH: AudioTrack::setVolume

We are getting a few of those crashes (android 12, redmi/poco devices)

setVolume:484 libaudioclient.android::AudioTrack::setVolume(float, float)
doSetVolume:112 libaaudio_internal.aaudio::AudioStreamTrack::doSetVolume()
playerSetVolume:336 libaaudio_internal.aaudio::AudioStream::MyPlayerBase::playerSetVolume()
setVolume:144 libaudioclient.android::PlayerBase::setVolume(float)
onTransact:644 libaudioclient.android::media::BnPlayer::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
transact:248 libbinder.android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
executeCommand:1028 libbinder.android::IPCThreadState::executeCommand(int)
getAndExecuteCommand:160 libbinder.android::IPCThreadState::getAndExecuteCommand()
joinThreadPool:68 libbinder.android::IPCThreadState::joinThreadPool(bool)
Unknown:-2 libbinder.0x6cbf8
_threadLoop:260 libutils.android::thread::_threadLoop(void*)
javaThreadShell:140 libandroid_runtime.android::AndroidRuntime::javaThreadShell(void*)
Unknown:-2 libutils.0x11acc
__pthread_start:264 libc.__pthread_start(void*)
__start_thread:64 libc.__start_thread

I was checking this:

I’m guessing they are related?

The stack traces are almost identical, so I am confident this is the exact same issue with Oboe on Android 12:

Your stack trace Known issue stack trace
android::AudioTrack::setVolume(float, float) android::AudioTrack::setVolume(float, float)
aaudio::AudioStreamTrack::doSetVolume() aaudio::AudioStreamTrack::doSetVolume()
aaudio::AudioStream::MyPlayerBase::playerSetVolume() aaudio::AudioStream::MyPlayerBase::playerSetVolume()
android::PlayerBase::setVolume(float) android::PlayerBase::setVolume(float)
android::media::BnPlayer::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int) android::media::BnPlayer::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int) android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)
android::IPCThreadState::executeCommand(int) android::IPCThreadState::executeCommand(int)
android::IPCThreadState::getAndExecuteCommand() android::IPCThreadState::getAndExecuteCommand()
android::IPCThreadState::joinThreadPool(bool) android::IPCThreadState::joinThreadPool(bool)
- android::PoolThread::threadLoop()
android::thread::_threadLoop(void*) android::thread::_threadLoop(void*)
android::AndroidRuntime::javaThreadShell(void*) android::AndroidRuntime::javaThreadShell(void*)

Unfortunately because this is a bug with the Android audio APIs and not related to FMOD, we cannot do anything on our end to prevent this crash.