Saraswati
Saraswati

Reputation: 1526

OSStatus 560161140 when getting kAudioSessionProperty_CurrentHardwareInputNumberChannels

OSStatus status;
/******** Number of input channels ***************/
UInt32 inputchannels; 
UInt32 sizeofdata= sizeof(inputchannels); 
//problematic: gives number of potential inputs, not number actually connected
status= AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareInputNumberChannels,&sizeofdata,&inputchannels);
[self checkStatus:status]; //prints statement 1 if OSStatus !=0
NSLog(@"Inputs %d \n",inputchannels); //prints statement 2

Above code results in OSStatus 560161140 (statement 1)..... and Inputs 0 (statement 2).

Any one please help me to know why i am getting this error status, what can it cause and how to prevent it........

Upvotes: 4

Views: 748

Answers (1)

trojanfoe
trojanfoe

Reputation: 122391

According to the Result Codes section of the Audio Session Services Reference:

560161140 == 0x21636174 == "!cat"

Which means:

The specified audio session category cannot be used for the attempted audio operation. For example, you attempted to play or record audio with the audio session category set to kAudioSessionCategory_AudioProcessing. Available in iOS 3.1 and later.

I can help you interpret the result but I cannot tell you the root cause.

Upvotes: 5

Related Questions