4
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
上面OSStatus 560161140(聲明1)代碼的結果.....和輸入0(聲明2)。OSStatus 560161140得到當kAudioSessionProperty_CurrentHardwareInputNumberChannels
任何一個請幫我知道爲什麼我收到此錯誤狀態,那是什麼原因和如何預防........