We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
崩溃停在了DOUAudioEventLoop.m文件的- (BOOL)_handleEvent:(event_type)event withStreamer:(DOUAudioStreamer **)streamer方法中的: NSAssert(status == noErr, @"failed to activate audio session"); 这个断言失败,status 不等于noErr, 打印出来了failed to activate audio session
The text was updated successfully, but these errors were encountered:
原因很简单:http://stackoverflow.com/a/6999245/4404288
解决办法如下:
将以下代码放到 if (status == noErr) { 之外:
if (status == noErr) {
[_renderer setInterrupted:NO]; if (*streamer != nil && [*streamer status] == DOUAudioStreamerPaused && [*streamer isPausedByInterruption]) { [*streamer setPausedByInterruption:NO]; [self performSelector:@selector(play) onThread:[NSThread mainThread] withObject:nil waitUntilDone:NO]; }
然后将如下代码全部注释掉:
#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated" OSStatus status; status = AudioSessionSetActive(TRUE); NSAssert(status == noErr, @"failed to activate audio session"); #pragma clang diagnostic pop if (status == noErr) { }
Sorry, something went wrong.
No branches or pull requests
崩溃停在了DOUAudioEventLoop.m文件的- (BOOL)_handleEvent:(event_type)event withStreamer:(DOUAudioStreamer **)streamer方法中的:
NSAssert(status == noErr, @"failed to activate audio session");
这个断言失败,status 不等于noErr, 打印出来了failed to activate audio session
The text was updated successfully, but these errors were encountered: