Search code examples
iosaudiounit

iOS - AudioUnitInitialize returns error code 561017449


I have an app in the App Store which uses AudioUnit for recording audio.

About once a week or so I am seeing that for some users in the wild the call to AudioUnitInitialize fails with the error code 561017449 which is also 0x21707269 or "irp!".

What does this error code mean? I've been unable to find it documented. Also:

~$ macerror 561017449
Unknown error (561017449) at /usr/bin/macerror5.16 line 40, <DATA> line 1.

There have been few instances of this issue, but so far there appears to be no pattern of commonality as far as device and OS version goes.

I'm not including code as I don't think that will be helpful just yet. The code is working on variety of devices already. At this time I'm most interested in learning details about this specific error.

Thanks!


Solution

  • This is defined in AVAudioSession.h:

    AVAudioSessionErrorInsufficientPriority = '!pri', /* 0x21707269, 561017449 */
    

    and is described as "The app was not allowed to set the audio category because another app (Phone, etc.) is controlling it."