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……..
According to the Result Codes section of the Audio Session Services Reference:
Which means:
I can help you interpret the result but I cannot tell you the root cause.