Android / AAudio stream repeatedly closes and reopens during System::update(), causing frame spikes on Samsung Device

Hi, I’m currently using the arm64 build of FMOD on Android and I’ve tested on multiple devices, where it seems to work fine. However, on the Samsung Galaxy Z Fold 6, I’m seeing an issue where the audio stream appears to repeatedly close and reopen, which then causes a noticeable hitch.

From my profiling, the spike happens during SoundSystem->update(), and on this device I keep seeing logs showing AAudioStream_close, AAudioStreamBuilder_openStream, and then AAudioStream_requestStart failing with messages like “stream was probably stolen”.

This only seems to happen specifically on the Z Fold 6. On the other Android devices I tested, I did not run into this problem.

I’m mainly wondering:

has anyone else seen this specifically on the Samsung Z Fold 6,

is this a known device-specific AAudio / FMOD issue,

or is there anything I should check on my side for why the stream would keep reopening on this device only

I’ve included the relevant log below.

026-03-10 01:29:12.812 18558-18851 AAudio com.example.jnicpp D AAudioStream_requestStop(s#108) called
2026-03-10 01:29:12.812 18558-18851 AAudioStream com.example.jnicpp D setState(s#108) from 2 to 10
2026-03-10 01:29:12.823 18558-18851 AAudio com.example.jnicpp D AAudioStream_close(s#108) called ---------------
2026-03-10 01:29:12.823 18558-18851 AudioStrea…nal_Client com.example.jnicpp D release_l(): mServiceStreamHandle = 0x00007CB0
2026-03-10 01:29:12.823 18558-18851 AAudioStream com.example.jnicpp D joinThread() - but has no thread or already join()ed
2026-03-10 01:29:12.823 18558-18851 AudioStrea…nal_Client com.example.jnicpp W requestStop_l() stop callback returned -895, returning early
2026-03-10 01:29:12.823 18558-18851 AAudioStream com.example.jnicpp D setState(s#108) from 10 to 11
2026-03-10 01:29:12.823 18558-18851 AAudioStream com.example.jnicpp D setState(s#108) from 11 to 11
2026-03-10 01:29:12.823 18558-18851 AAudioStream com.example.jnicpp D setState(s#108) from 11 to 12
2026-03-10 01:29:12.823 18558-18851 AudioStrea…nal_Client com.example.jnicpp D ~AudioStreamInternal() 0xb4000077eaf50980 called
2026-03-10 01:29:12.823 18558-18851 AAudioStream com.example.jnicpp D ~AudioStream(s#108) mPlayerBase strongCount = 2
2026-03-10 01:29:12.823 18558-18851 AAudio com.example.jnicpp D AAudioStream_close(s#108) returned 0 ---------
2026-03-10 01:29:12.834 18558-18851 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() called ----------------------------------------
2026-03-10 01:29:12.834 18558-18851 AudioStreamBuilder com.example.jnicpp I rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
2026-03-10 01:29:12.834 18558-18851 AudioStreamBuilder com.example.jnicpp I device = 0, sessionId = -1, perfMode = 12, callback: OFF with frames = 0
2026-03-10 01:29:12.834 18558-18851 AudioStreamBuilder com.example.jnicpp I usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
2026-03-10 01:29:12.834 18558-18851 AudioStreamBuilder com.example.jnicpp I privacy sensitive = false, opPackageName = (null), attributionTag = (null)
2026-03-10 01:29:12.834 18558-18851 .example.jnicpp com.example.jnicpp D PlayerBase::PlayerBase()
2026-03-10 01:29:12.835 18558-18851 AudioStrea…nal_Client com.example.jnicpp D configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
2026-03-10 01:29:12.835 18558-18851 IsochronousClockModel com.example.jnicpp D setFramesPerBurst() - mFramesPerBurst = 96 - mBurstPeriodNanos = 2000000
2026-03-10 01:29:12.835 18558-18851 AAudioStream com.example.jnicpp D setState(s#109) from 0 to 2
2026-03-10 01:29:12.835 18558-18851 AAudioFlowGraph com.example.jnicpp I configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
2026-03-10 01:29:12.836 18558-18851 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#109 ----------------
2026-03-10 01:29:12.847 18558-18851 AAudio com.example.jnicpp D AAudioStream_close(s#109) called ---------------
2026-03-10 01:29:12.847 18558-18851 AudioStrea…nal_Client com.example.jnicpp D release_l(): mServiceStreamHandle = 0x00007CB1
2026-03-10 01:29:12.847 18558-18851 AAudioStream com.example.jnicpp D setState(s#109) from 2 to 11
2026-03-10 01:29:12.847 18558-18851 AAudioStream com.example.jnicpp D setState(s#109) from 11 to 11
2026-03-10 01:29:12.847 18558-18851 AAudioStream com.example.jnicpp D setState(s#109) from 11 to 12
2026-03-10 01:29:12.847 18558-18851 AudioStrea…nal_Client com.example.jnicpp D ~AudioStreamInternal() 0xb4000077eaf50980 called
2026-03-10 01:29:12.847 18558-18851 AAudioStream com.example.jnicpp D ~AudioStream(s#109) mPlayerBase strongCount = 2
2026-03-10 01:29:12.847 18558-18851 AAudio com.example.jnicpp D AAudioStream_close(s#109) returned 0 ---------
2026-03-10 01:29:12.857 18558-18851 fmod com.example.jnicpp I FMOD::supportsLowLatency : Low latency = false, Pro Audio = false, Bluetooth On = false, Acceptable Block Size = false (0)
2026-03-10 01:29:12.858 18558-18851 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() called ----------------------------------------
2026-03-10 01:29:12.858 18558-18851 AudioStreamBuilder com.example.jnicpp I rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
2026-03-10 01:29:12.858 18558-18851 AudioStreamBuilder com.example.jnicpp I device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
2026-03-10 01:29:12.858 18558-18851 AudioStreamBuilder com.example.jnicpp I usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
2026-03-10 01:29:12.858 18558-18851 AudioStreamBuilder com.example.jnicpp I privacy sensitive = false, opPackageName = (null), attributionTag = (null)
2026-03-10 01:29:12.858 18558-18851 .example.jnicpp com.example.jnicpp D PlayerBase::PlayerBase()
2026-03-10 01:29:12.859 18558-18851 AudioStrea…nal_Client com.example.jnicpp D configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
2026-03-10 01:29:12.859 18558-18851 IsochronousClockModel com.example.jnicpp D setFramesPerBurst() - mFramesPerBurst = 96 - mBurstPeriodNanos = 2000000
2026-03-10 01:29:12.859 18558-18851 AAudioStream com.example.jnicpp D setState(s#110) from 0 to 2
2026-03-10 01:29:12.859 18558-18851 AAudioFlowGraph com.example.jnicpp I configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
2026-03-10 01:29:12.860 18558-18851 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#110 ----------------
2026-03-10 01:29:12.869 18558-18558 ViewRootIm…nActivity] com.example.jnicpp I ViewPostIme pointer 1
2026-03-10 01:29:12.871 18558-18851 AAudio com.example.jnicpp D AAudioStream_close(s#110) called ---------------
2026-03-10 01:29:12.871 18558-18851 AudioStrea…nal_Client com.example.jnicpp D release_l(): mServiceStreamHandle = 0x00007CB2
2026-03-10 01:29:12.871 18558-18851 AAudioStream com.example.jnicpp D setState(s#110) from 2 to 11
2026-03-10 01:29:12.871 18558-18851 AAudioStream com.example.jnicpp D setState(s#110) from 11 to 11
2026-03-10 01:29:12.871 18558-18851 AAudioStream com.example.jnicpp D setState(s#110) from 11 to 12
2026-03-10 01:29:12.871 18558-18851 AudioStrea…nal_Client com.example.jnicpp D ~AudioStreamInternal() 0xb4000077eaf50980 called
2026-03-10 01:29:12.871 18558-18851 AAudioStream com.example.jnicpp D ~AudioStream(s#110) mPlayerBase strongCount = 2
2026-03-10 01:29:12.871 18558-18851 AAudio com.example.jnicpp D AAudioStream_close(s#110) returned 0 ---------
2026-03-10 01:29:12.881 18558-18851 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() called ----------------------------------------
2026-03-10 01:29:12.881 18558-18851 AudioStreamBuilder com.example.jnicpp I rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
2026-03-10 01:29:12.881 18558-18851 AudioStreamBuilder com.example.jnicpp I device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
2026-03-10 01:29:12.881 18558-18851 AudioStreamBuilder com.example.jnicpp I usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
2026-03-10 01:29:12.881 18558-18851 AudioStreamBuilder com.example.jnicpp I privacy sensitive = false, opPackageName = (null), attributionTag = (null)
2026-03-10 01:29:12.882 18558-18851 .example.jnicpp com.example.jnicpp D PlayerBase::PlayerBase()
2026-03-10 01:29:12.883 18558-18851 AudioStrea…nal_Client com.example.jnicpp D configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
2026-03-10 01:29:12.883 18558-18851 IsochronousClockModel com.example.jnicpp D setFramesPerBurst() - mFramesPerBurst = 96 - mBurstPeriodNanos = 2000000
2026-03-10 01:29:12.883 18558-18851 AAudioStream com.example.jnicpp D setState(s#111) from 0 to 2
2026-03-10 01:29:12.883 18558-18851 AAudioFlowGraph com.example.jnicpp I configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
2026-03-10 01:29:12.885 18558-18851 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#111 ----------------
2026-03-10 01:29:12.885 18558-18851 AAudio com.example.jnicpp D AAudioStream_requestStart(s#111) called --------------
2026-03-10 01:29:12.885 18558-18851 AAudioStream com.example.jnicpp D setState(s#111) from 2 to 3
2026-03-10 01:29:12.885 18558-18851 AudioStrea…nal_Client com.example.jnicpp D requestStart_l() error = -895, stream was probably stolen
2026-03-10 01:29:12.885 18558-18851 AAudioStream com.example.jnicpp D setDisconnected setting disconnected, current disconnected: 0, current state: 3
2026-03-10 01:29:12.886 18558-18851 AAudioStream com.example.jnicpp D setState(s#111) from 3 to 2
2026-03-10 01:29:12.886 18558-18851 AAudio com.example.jnicpp D AAudioStream_requestStart(s#111) returned -899 ---------

What version of FMOD are you using? Can you please swap out your libs for the “fmodL” logging libs, and call FMOD::Debug_Initialize(FMOD_DEBUG_LEVEL_LOG) at the start of your application and share the log you get while reproducing this issue?

hi Jeff thanks for the response, the version I am currently using is 2.03.09, here are the logs

2026-03-17 09:35:01.690 25302-25556 fmod com.example.jnicpp I Thread::callback : FMOD mixer thread finished.
2026-03-17 09:35:01.690 25302-25463 AAudio com.example.jnicpp D AAudioStream_requestStop(s#48) called
2026-03-17 09:35:01.691 25302-25463 AAudioStream com.example.jnicpp D setState(s#48) from 2 to 10
2026-03-17 09:35:01.701 25302-25463 AAudio com.example.jnicpp D AAudioStream_close(s#48) called ---------------
2026-03-17 09:35:01.701 25302-25463 AudioStrea…nal_Client com.example.jnicpp D release_l(): mServiceStreamHandle = 0x00008515
2026-03-17 09:35:01.701 25302-25463 AAudioStream com.example.jnicpp D joinThread() - but has no thread or already join()ed
2026-03-17 09:35:01.701 25302-25463 AudioStrea…nal_Client com.example.jnicpp W requestStop_l() stop callback returned -895, returning early
2026-03-17 09:35:01.701 25302-25463 AAudioStream com.example.jnicpp D setState(s#48) from 10 to 11
2026-03-17 09:35:01.703 25302-25463 AAudioStream com.example.jnicpp D setState(s#48) from 11 to 11
2026-03-17 09:35:01.703 25302-25463 AAudioStream com.example.jnicpp D setState(s#48) from 11 to 12
2026-03-17 09:35:01.703 25302-25463 AudioStrea…nal_Client com.example.jnicpp D ~AudioStreamInternal() 0xb4000077eaf36cf0 called
2026-03-17 09:35:01.703 25302-25463 AAudioStream com.example.jnicpp D ~AudioStream(s#48) mPlayerBase strongCount = 2
2026-03-17 09:35:01.703 25302-25463 AAudio com.example.jnicpp D AAudioStream_close(s#48) returned 0 ---------
2026-03-17 09:35:01.715 25302-25463 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() called ----------------------------------------
2026-03-17 09:35:01.715 25302-25463 AudioStreamBuilder com.example.jnicpp I rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
2026-03-17 09:35:01.715 25302-25463 AudioStreamBuilder com.example.jnicpp I device = 0, sessionId = -1, perfMode = 12, callback: OFF with frames = 0
2026-03-17 09:35:01.715 25302-25463 AudioStreamBuilder com.example.jnicpp I usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
2026-03-17 09:35:01.715 25302-25463 AudioStreamBuilder com.example.jnicpp I privacy sensitive = false, opPackageName = (null), attributionTag = (null)
2026-03-17 09:35:01.716 25302-25463 .example.jnicpp com.example.jnicpp D PlayerBase::PlayerBase()
2026-03-17 09:35:01.719 25302-25463 AudioStrea…nal_Client com.example.jnicpp D configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
2026-03-17 09:35:01.719 25302-25463 IsochronousClockModel com.example.jnicpp D setFramesPerBurst() - mFramesPerBurst = 96 - mBurstPeriodNanos = 2000000
2026-03-17 09:35:01.719 25302-25463 AAudioStream com.example.jnicpp D setState(s#49) from 0 to 2
2026-03-17 09:35:01.720 25302-25463 AAudioFlowGraph com.example.jnicpp I configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
2026-03-17 09:35:01.722 25302-25463 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#49 ----------------
2026-03-17 09:35:01.732 25302-25463 AAudio com.example.jnicpp D AAudioStream_close(s#49) called ---------------
2026-03-17 09:35:01.732 25302-25463 AudioStrea…nal_Client com.example.jnicpp D release_l(): mServiceStreamHandle = 0x00008516
2026-03-17 09:35:01.732 25302-25463 AAudioStream com.example.jnicpp D setState(s#49) from 2 to 11
2026-03-17 09:35:01.734 25302-25463 AAudioStream com.example.jnicpp D setState(s#49) from 11 to 11
2026-03-17 09:35:01.734 25302-25463 AAudioStream com.example.jnicpp D setState(s#49) from 11 to 12
2026-03-17 09:35:01.734 25302-25463 AudioStrea…nal_Client com.example.jnicpp D ~AudioStreamInternal() 0xb4000077eaf36cf0 called
2026-03-17 09:35:01.734 25302-25463 AAudioStream com.example.jnicpp D ~AudioStream(s#49) mPlayerBase strongCount = 2
2026-03-17 09:35:01.734 25302-25463 AAudio com.example.jnicpp D AAudioStream_close(s#49) returned 0 ---------
2026-03-17 09:35:01.745 25302-25463 fmod com.example.jnicpp I FMOD::supportsLowLatency : Low latency = false, Pro Audio = false, Bluetooth On = false, Acceptable Block Size = false (0)
2026-03-17 09:35:01.746 25302-25463 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() called ----------------------------------------
2026-03-17 09:35:01.746 25302-25463 AudioStreamBuilder com.example.jnicpp I rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
2026-03-17 09:35:01.746 25302-25463 AudioStreamBuilder com.example.jnicpp I device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
2026-03-17 09:35:01.746 25302-25463 AudioStreamBuilder com.example.jnicpp I usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
2026-03-17 09:35:01.746 25302-25463 AudioStreamBuilder com.example.jnicpp I privacy sensitive = false, opPackageName = (null), attributionTag = (null)
2026-03-17 09:35:01.746 25302-25463 .example.jnicpp com.example.jnicpp D PlayerBase::PlayerBase()
2026-03-17 09:35:01.750 25302-25463 AudioStrea…nal_Client com.example.jnicpp D configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
2026-03-17 09:35:01.750 25302-25463 IsochronousClockModel com.example.jnicpp D setFramesPerBurst() - mFramesPerBurst = 96 - mBurstPeriodNanos = 2000000
2026-03-17 09:35:01.750 25302-25463 AAudioStream com.example.jnicpp D setState(s#50) from 0 to 2
2026-03-17 09:35:01.750 25302-25463 AAudioFlowGraph com.example.jnicpp I configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
2026-03-17 09:35:01.752 25302-25463 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#50 ----------------
2026-03-17 09:35:01.762 25302-25463 AAudio com.example.jnicpp D AAudioStream_close(s#50) called ---------------
2026-03-17 09:35:01.762 25302-25463 AudioStrea…nal_Client com.example.jnicpp D release_l(): mServiceStreamHandle = 0x00008517
2026-03-17 09:35:01.763 25302-25463 AAudioStream com.example.jnicpp D setState(s#50) from 2 to 11
2026-03-17 09:35:01.764 25302-25463 AAudioStream com.example.jnicpp D setState(s#50) from 11 to 11
2026-03-17 09:35:01.764 25302-25463 AAudioStream com.example.jnicpp D setState(s#50) from 11 to 12
2026-03-17 09:35:01.765 25302-25463 AudioStrea…nal_Client com.example.jnicpp D ~AudioStreamInternal() 0xb4000077eaf36cf0 called
2026-03-17 09:35:01.765 25302-25463 AAudioStream com.example.jnicpp D ~AudioStream(s#50) mPlayerBase strongCount = 2
2026-03-17 09:35:01.765 25302-25463 AAudio com.example.jnicpp D AAudioStream_close(s#50) returned 0 ---------
2026-03-17 09:35:01.775 25302-25463 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() called ----------------------------------------
2026-03-17 09:35:01.775 25302-25463 AudioStreamBuilder com.example.jnicpp I rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
2026-03-17 09:35:01.775 25302-25463 AudioStreamBuilder com.example.jnicpp I device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
2026-03-17 09:35:01.775 25302-25463 AudioStreamBuilder com.example.jnicpp I usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
2026-03-17 09:35:01.775 25302-25463 AudioStreamBuilder com.example.jnicpp I privacy sensitive = false, opPackageName = (null), attributionTag = (null)
2026-03-17 09:35:01.776 25302-25463 .example.jnicpp com.example.jnicpp D PlayerBase::PlayerBase()
2026-03-17 09:35:01.779 25302-25463 AudioStrea…nal_Client com.example.jnicpp D configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
2026-03-17 09:35:01.779 25302-25463 IsochronousClockModel com.example.jnicpp D setFramesPerBurst() - mFramesPerBurst = 96 - mBurstPeriodNanos = 2000000
2026-03-17 09:35:01.780 25302-25463 AAudioStream com.example.jnicpp D setState(s#51) from 0 to 2
2026-03-17 09:35:01.780 25302-25463 AAudioFlowGraph com.example.jnicpp I configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
2026-03-17 09:35:01.782 25302-25463 AAudio com.example.jnicpp I AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#51 ----------------
2026-03-17 09:35:01.782 25302-25463 fmod com.example.jnicpp W AAudio_CreateStream : Could not set driver at index [0]. Defaulting to driver with id: 3.
2026-03-17 09:35:01.782 25302-25463 fmod com.example.jnicpp I AAudio_Init : Sample rate: HW = 48000, SW = 24000 Block size: HW = 96, SW = 512.
2026-03-17 09:35:01.782 25302-25463 fmod com.example.jnicpp I SystemI::startDriver : Output requires a sample rate of 48000Hz, resampling will occur.
2026-03-17 09:35:01.782 25302-25463 AAudio com.example.jnicpp D AAudioStream_requestStart(s#51) called --------------
2026-03-17 09:35:01.782 25302-25463 AAudioStream com.example.jnicpp D setState(s#51) from 2 to 3
2026-03-17 09:35:01.783 25302-25463 AudioStrea…nal_Client com.example.jnicpp D requestStart_l() error = -895, stream was probably stolen
2026-03-17 09:35:01.783 25302-25463 AAudioStream com.example.jnicpp D setDisconnected setting disconnected, current disconnected: 0, current state: 3
2026-03-17 09:35:01.783 25302-25463 AAudioStream com.example.jnicpp D setState(s#51) from 3 to 2
2026-03-17 09:35:01.783 25302-25463 AAudio com.example.jnicpp D AAudioStream_requestStart(s#51) returned -899 ---------
2026-03-17 09:35:01.783 25302-25463 fmod com.example.jnicpp W AAudio_Start : Could not start audio player. Attempting reset. Result = 0xFFFFFC7D.
2026-03-17 09:35:01.783 25302-25463 fmod com.example.jnicpp I Thread::initThread : Init FMOD mixer thread. Affinity: 0x4000000000000001, Priority: 0xFFFF7FFA, Stack Size: 81920, Semaphore: Yes, Sleep Time: 0, Looping: Yes.

Thanks for the extra info. The main things I’m seeing are:

0xFFFFFC7D is AAUDIO_ERROR_DISCONNECTED

And this:

-896 is AAUDIO_ERROR_TIMEOUT

So the stream is being created, but we can’t start it because the OS says the device isn’t connected. Just for debug purposes, can you see if any other drivers are available or working correctly? For example:

void tryNextDriver(FMOD::System* system)
{
    int driver;
    int numdrivers;

    system->getDriver(&driver);
    system->getNumDrivers(&numdrivers);
    driver = (driver + 1) % numdrivers;

    system->setDriver(driver);
}

I tested the tryNextDriver function and logged both the current driver and number of drivers. It looks like my device only has 1 available driver and is currently using driver 0, so there isn’t an alternative driver to switch to.

Ok, thanks for giving that a shot. There’s sill not a whole lot to go on unfortunately.
Can you please try downloading the oboe tester app, run the “TEST OUTPUT” test, and let me know if you get any similar hitching?

The app is returning the errors Error: Start failed with -899, Error Disconnected and Error: startAudio() caught startNative returned-899, ErrorDisconnected.
In a subsequent test, it instead reports Error: Start failed with -895, ErrorInvalidState and Error: startAudio() caught startNative returned -895, ErrorInvalidState

Okay, I think there might be a problem with AAudio on the device itself- that app is a sanity test for the AAudio API on Android, and if it’s erroring out there then the problem isn’t constrained to just FMOD.
Can you please see if you get a better result with an alternative FMOD_OUTPUTTYPE?
For Android that’s a matter of calling System::setOutput with either FMOD_OUTPUTTYPE_AUDIOTRACK or FMOD_OUTPUTTYPE_OPENSL.

setting audio output toFMOD_OUTPUTTYPE_AUDIOTRACK works, thank you so much.

1 Like