Audio is silent on iOS device

Hi guys,

While working on porting an app to iOS, I’m facing a problem with sound not working at all on iOS.

I went ahead and created a very simple test Unity (2019.2.12f1) project using FMOD 2.00.06 and the same issue remained: no sound is coming out of the iPad Pro speakers (running iOS 13). And I am not seing any error in the XCode console.

The little test project can be downloaded from here: https://www.dropbox.com/s/ndzb8d2ung4a55a/FMOD_IOS_TEST.zip?dl=0

I’ve already spent many hours trying to find what I’m doing wrong without success. Could anybody help me to figure this out by looking into the test project?

Thanks!

I was able to run your test on two different devices (after disabling the arkit) and the audio was working fine.

I would suggest trying a development build, you will need to change the libs over to logging, and see if you get any more info.
https://fmod.com/resources/documentation-unity?version=2.0&page=platform-specifics.html#fmod-libs-on-static-platforms

Hi @cameron-fmod,

Thanks for your feedback.

I’ve tried both Development and Production builds with and without the “L” lib with no luck.

I do need to have ARKit activated. I’m working on an AR app. Is FMOD not compatible with ARKit?

Not that I am aware of, just the device I was using was a bit older and did not support it.

If you can use a development build and set the FMOD logging level to ‘LOG’ this should provide the most amount of useful information. There should be something in the logs that will tell us there is no audio.

@cameron-fmod

Please find the logs below. I don’t see anything special. Do you?

FMOD settings

In my initialization code, I have a coroutine using RuntimeManager.AnyBankLoading() which works as expected. The app runs as it is supposed to. The only problem is audio is muted.

Full logs

2019-12-16 11:24:00.705575+0100 app[82424:4329646] Built from ‘2019.2/staging’ branch, Version ‘2019.2.12f1 (b1a7e1fb4fa5)’, Build type ‘Release’, Scripting Backend ‘il2cpp’
2019-12-16 11:24:00.709964+0100 app[82424:4329646] -> registered mono modules 0x103508760
-> applicationDidFinishLaunching()
Loading player data from /private/var/containers/Bundle/Application/F47A9D74-244B-4647-B157-31FF3B7501EB/app.app/Data/data.unity3d
2019-12-16 11:24:00.819809+0100 app[82424:4329646] Metal GPU Frame Capture Enabled
-> applicationDidBecomeActive()
[XR] Discovering subsystems at path /private/var/containers/Bundle/Application/F47A9D74-244B-4647-B157-31FF3B7501EB/app.app/Data/UnitySubsystems
[XR] No descriptors matched for examples in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] 1 ‘inputs’ descriptors matched in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json
[XR] No descriptors matched for cameras in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for displays in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for depths in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for meshings in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for planes in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for raycasts in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for referencePoints in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for sessions in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for experience in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for gestures in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A12X GPU
Initialize engine version: 2019.2.12f1 (b1a7e1fb4fa5)
UnloadTime: 0.365542 ms
[XR] Loading plugin UnityARKit for subsystem ARKit-Input…
[XR] UnityARKit successfully registered Provider for ARKit-Input
[LOG] System::create : Header version = 2.00.06. Current version = 2.00.06.
[LOG] SystemI::setOutputInternal : Setting output to ‘FMOD Core Audio Output’
[LOG] Manager::init : maxchannels = 128 studioflags = 00000008 flags 00000000 extradriverdata 0x0.
[LOG] SystemI::init : Initialize version=20006 (106220), maxchannels=128, flags=0x00020000
[LOG] OutputCoreAudio::init : Hardware buffer size: 1024 samples, hardware sample rate: 48000Hz, hardware channels: 2
[LOG] OutputCoreAudio::init : Maximum hardware read size: 4096 samples, Software buffer size: 512 samples, Number of software buffers: 4.
[WRN] OutputCoreAudio::init : DSP buffer size * DSP num buffers is potentially too small.
[WRN] SystemI::init : Output requires a sample rate of 48000Hz, resampling will occur.
[LOG] Thread::initThread : Init FMOD stream thread. Priority: 2, Stack Size: 98304, Semaphore: No, Sleep Time: 10, Looping: Yes.
[LOG] SystemI::DSPCodecPoolRegister : register codec pool for pool type 7
[LOG] Thread::initThread : Init FMOD mixer thread. Priority: 1, Stack Size: 81920, Semaphore: Yes, Sleep Time: 0, Looping: Yes.
[LOG] AsyncManager::init : manager 0x10a17d208 isAsync 1 updatePeriod 0.02
[LOG] Thread::initThread : Init FMOD Studio update thread. Priority: 0, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] AsyncManager::init : done
[LOG] PlaybackSystem::init :
[LOG] Thread::initThread : Init FMOD Studio sample load thread. Priority: 0, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] PlaybackSystem::init : done
[LOG] Thread::initThread : Init FMOD Studio bank load thread. Priority: 0, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] Manager::init : done.
2019-12-16 11:24:02.566431+0100 app[82424:4329646] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x10a9215d0>.
[LOG] Manager::readBank : fileversion = 123, compatVersion = 119 (oldest = 44, newest = 123)
[LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 3
[LOG] Manager::readBank : fileversion = 123, compatVersion = 119 (oldest = 44, newest = 123)
[LOG] Manager::readBank : fileversion = 123, compatVersion = 119 (oldest = 44, newest = 123)
2019-12-16 11:24:04.363784+0100 app[82424:4329970] [Technique] World tracking performance is being affected by resource constraints [3]
2019-12-16 11:24:04.363853+0100 app[82424:4329970] [Technique] VIO error callback: 608425.287407, 3, Frame time stamps are either out of order or repeating
Loading wave
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.MonoBehaviour:print(Object)
LocationsController:LoadLocation(String, Single, Action, Action, Action1, Action1)
MainController:LoadDefaultLocation()
d__14:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
[LOG] SystemI::createSound : memory = 0x136480020 : mode 12010082
[LOG] SystemI::createSound : FMOD_NONBLOCKING specified. Putting into queue to be opened asynchronously!
[LOG] Thread::initThread : Init FMOD nonblocking thread (0). Priority: 1, Stack Size: 114688, Semaphore: Yes, Sleep Time: 0, Looping: Yes.
[LOG] SystemI::createSound : setdata soundi = 0x1267baa98 : node = 0x1097117d0
[LOG] SystemI::createSound : add node to async list : head = 0x12e3a1c58. list count = 0
[LOG] AsyncThread::threadFunc : Starting Asynchronous operation on sound 0x1267baa98
[LOG] SystemI::createSoundInternal : Create data=0x136480020, mode=0x12010082
[LOG] SystemI::createSoundInternal : exinfo->cbsize = 224
[LOG] SystemI::createSoundInternal : exinfo->length = 15035136
[LOG] SystemI::createSoundInternal : exinfo->fileoffset = 38752
[LOG] SystemI::createSoundInternal : exinfo->numsubsounds = 1
[LOG] SystemI::createSoundInternal : exinfo->inclusionlist = 0x1097118e0
[LOG] SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
[LOG] SystemI::createSoundInternal : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal : exinfo->initialseekpostype = 1
[LOG] SystemI::createSoundInternal : Stream 0/1: name=‘MenuAmbient’, format=2, channels=2, frequency=24000, lengthbytes=14513248, lengthpcm=13269248, pcmblocksize=256, loopstart=0, loopend=0, mode=0x00000000, channelmask=0x00000000, channelorder=0, peakvolume=0.988678.
[LOG] AsyncThread::threadFunc : Finished Asynchronous operation on sound 0x1267baa98
[LOG] SoundI::getSubSound : sound 0x1267baa98. Subsound index 0 / 1
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 0.298833 ms
Loading location scene:Assets/Locations/Wave/SubLocation1/Wave_SubLocation1.unity
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.MonoBehaviour:print(Object)
d__16:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
LocationController:OnEnable()
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
Unloading 16 unused Assets to reduce memory usage. Loaded Objects now: 1608.
Total: 4.131792 ms (FindLiveObjects: 0.207667 ms CreateObjectMapping: 0.067458 ms MarkObjects: 3.761083 ms DeleteObjects: 0.095125 ms)
Loading assets scene:Assets/Locations/Wave/SubLocation1/Scenes/Wave_Assets_Mobile.unity
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.MonoBehaviour:print(Object)
d__27:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
SubLocationController:OnEnable()
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
WARNING -> applicationDidReceiveMemoryWarning()
2019-12-16 11:24:41.651606+0100 app[82424:4329853] [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
WARNING -> applicationDidReceiveMemoryWarning()
[LOG] Manager::readBank : fileversion = 123, compatVersion = 119 (oldest = 44, newest = 123)
Location wave loaded!
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.MonoBehaviour:print(Object)
MainController:OnLocationLoaded(String)
System.Action`1:Invoke(T)
d__9:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
[LOG] SystemI::createSoundInternal : Create data=0x13eb1c020, mode=0x12000202
[LOG] SystemI::createSoundInternal : exinfo->cbsize = 224
[LOG] SystemI::createSoundInternal : exinfo->length = 541664
[LOG] SystemI::createSoundInternal : exinfo->fileoffset = 1760
[LOG] SystemI::createSoundInternal : exinfo->numsubsounds = 1
[LOG] SystemI::createSoundInternal : exinfo->inclusionlist = 0x170dbe7e4
[LOG] SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
[LOG] SystemI::createSoundInternal : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister : register codec pool for pool type 7
[LOG] SystemI::createSoundInternal : Sample 0/1: name=‘Intro_Watch’, format=2, channels=1, frequency=24000, lengthbytes=72672, lengthpcm=132864, pcmblocksize=256, loopstart=0, loopend=0, mode=0x00000000, channelmask=0x00000000, channelorder=0, peakvolume=0.486877.
[LOG] SystemI::createSound : memory = 0x13eb1c020 : mode 12010082
[LOG] SystemI::createSound : FMOD_NONBLOCKING specified. Putting into queue to be opened asynchronously!
[LOG] SystemI::createSound : setdata soundi = 0x10aa542d8 : node = 0x10aaa34b0
[LOG] SystemI::createSound : add node to async list : head = 0x12e3a1c58. list count = 0
[LOG] AsyncThread::threadFunc : Starting Asynchronous operation on sound 0x10aa542d8
[LOG] SystemI::createSoundInternal : Create data=0x13eb1c020, mode=0x12010082
[LOG] SystemI::createSoundInternal : exinfo->cbsize = 224
[LOG] SystemI::createSoundInternal : exinfo->length = 541664
[LOG] SystemI::createSoundInternal : exinfo->fileoffset = 1760
[LOG] SystemI::createSoundInternal : exinfo->numsubsounds = 1
[LOG] SystemI::createSoundInternal : exinfo->inclusionlist = 0x10aaa35c0
[LOG] SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
[LOG] SystemI::createSoundInternal : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal : exinfo->initialseekpostype = 1
[LOG] SystemI::createSoundInternal : Stream 0/1: name=‘Wave’, format=2, channels=1, frequency=24000, lengthbytes=468864, lengthpcm=857344, pcmblocksize=256, loopstart=0, loopend=0, mode=0x00000000, channelmask=0x00000000, channelorder=0, peakvolume=0.707001.
[LOG] AsyncThread::threadFunc : Finished Asynchronous operation on sound 0x10aa542d8
[LOG] SoundI::getSubSound : sound 0x10aa542d8. Subsound index 0 / 1
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
-> applicationWillResignActive()
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
[WRN] OutputRingBuffer::read : Insufficient buffer size detected, requested 32768 bytes, buffer size is 16384 bytes.
-> applicationDidEnterBackground()
2019-12-16 11:25:02.329170+0100 app[82424:4329646] Can’t end BackgroundTask: no background task exists with identifier 1 (0x1), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.

I figured this was an issue with the device I was using. The cause was not FMOD. Thank you again for your support.

:heart: FMOD