Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
1 participant
@dabing1022
Copy link
Owner

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
You can’t perform that action at this time.