AVAudioSessionManager availableInputs “Unknown selected data source for port iPhone Microphone”

前端 未结 2 1428
旧巷少年郎
旧巷少年郎 2021-02-18 13:00

I\'ve noticed this error in my console log for a while. Though it does not affect the execution of my application, I find it really annoying. Thus, I started to trace where this

2条回答
  •  别跟我提以往
    2021-02-18 13:56

    This problem seems not just happen to me... I will just share my understanding here..

    My situation is.. I'm using pjsip library, which has a lower level control of audio resources. I've noticed that, the sound device has been closed before I call [[AVAudioSession sharedInstance] availableInputs];

    Thus, (I guess) AVAudioSession, as a higher level control, couldn't find corresponding audio data source for its input - as the error indicated...

    To further investigate the problem, you'd better check somewhere in your code that modify the audio source.. and make sure the audio source is activated before you call AVAudioSession

    I can only go this far for now... Deeper understanding and better explanation of audio control is always appreciated!!

提交回复
热议问题