ios音频录制"prepareToRecord"模拟器崩溃解决办法 #5

Open
dabing1022 opened this Issue Jan 12, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@dabing1022
Owner

dabing1022 commented Jan 12, 2015

问题描述

在心城的开发过程中,在处理音频部分时,有这么段代码

NSError* error;
self.audioRecorder = [[AVAudioRecorder alloc] initWithURL:[self getTempAudioPath] settings:settingDic error:&error];;
//...
if ([self.audioRecorder prepareToRecord]) {
    [self.audioRecorder record];
}

在模拟器上崩溃,始终停在了prepareToRecord这一行,但真机测试没问题。怀疑是模拟器的bug。
Stackoverflow问题讨论

解决办法(不是办法的办法)

在测试音频录制功能时,先暂时禁用掉Xcode的全局断点功能。之后,恢复正常开启全局断点。(默认快捷键:Command+Y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment