AVAudioPlayer doesn't start playing in background

前端 未结 4 1339
我寻月下人不归
我寻月下人不归 2021-01-16 18:39

I am using AVAudioPlayer and NSFileHandle to do audio streaming. The basic idea is that I save the streaming audio data to the device with file sys

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-16 18:57

    Faced this very problem. Let me suggest you to use AVAudioSessionCategoryOptionMixWithOthers with -setCategory:withOptions:error:. Also, probably it makes sense to activate the session after you set the category, not before.

提交回复
热议问题