AudioUnitRender -10876

iOS使用AudioUnit錄音,在錄音回調中使用AudioUnitRender播放錄製的人聲時,

返回-10876這個錯誤。

這裏https://www.osstatus.com/search/results?platform=all&framework=all&search=-10876查詢到錯誤碼:

kAudioUnitErr_NoConnection。

解決方法:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback

                                           error:nil];

改成:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord

                                           error:nil];

如果還不行,看看別的地方是不是設置了AVAudioSessionCategoryPlayback。





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章