OSStatus 560161140 upon receipt of 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 

The above code leads to the output of OSStatus 560161140 (statement 1) ..... and Inputs 0 (statement 2).

Someone please help me find out why I get this error status, what it can cause and how to prevent it ........

+4
source share
1 answer

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

 560161140 == 0x21636174 == "!cat" 

It means:

The specified audio session category cannot be used to attempt audio. For example, you tried 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.

+5
source

Source: https://habr.com/ru/post/1444355/


All Articles