Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - AudioUnitInitialize returns error code 561017449

Tags:

ios

audiounit

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!

like image 790
Chuck Batson Avatar asked Nov 05 '14 14:11

Chuck Batson


2 Answers

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."

like image 112
Chuck Batson Avatar answered Oct 21 '22 23:10

Chuck Batson


After wasting a lot of time I found that this issue is occurring in my device(iPad) just after debugging my current code in it without uninstalling the existing live app. The record and play permission was creating the issue. So uninstalling then installing a fresh build magically does the job for me.

like image 36
kripa_northout Avatar answered Oct 21 '22 22:10

kripa_northout