AVAudioRecorder录制的音频用AVAudioPlayer播放出来声音很小

it2022-05-09  24

1 2 NSError *playerError; 3 4 player = [[AVAudioPlayer alloc] initWithContentsOfURL:recordedFile error:&playerError]; 5 6 7 //在前面加上 8 AVAudioSession *audioSession = [AVAudioSession sharedInstance]; 9 NSError *err = nil; 10 [audioSession setCategory :AVAudioSessionCategoryPlayback error:&err]; 11 //弄好了,在播放前这样就可以了

 

转载于:https://www.cnblogs.com/KingQiangzi/p/3556313.html


最新回复(0)