我需要允许我的应用程序在不停止背景音乐播放器的情况下录制音频。
我使用的是AVAudioRecorder。
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];但是,只要调用audioplayer record,背景音乐就会停止播放。
我该怎么做才能让背景音乐不会停止播放?
谢谢。
发布于 2015-12-08 04:46:26
您还需要添加MixWithOthers类别选项:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord
withOptions:AVAudioSessionCategoryOptionMixWithOthers
error:nil];https://stackoverflow.com/questions/34059481
复制相似问题