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

Fixes deadlock in #100 #104

Merged
merged 1 commit into from
Oct 8, 2016
Merged

Conversation

hannseman
Copy link
Contributor

@hannseman hannseman commented Oct 3, 2016

This PR fixes the issue described in #100

I've removed the source.isRunning check which if false would try and stop the audio unit. This did cause deadlocks where a blocking AudioOutputUnitStop-call in delloc would wait for the next callback to finish. When the last callback is run it will also try to call AudioOutputUnitStop if isRunning is set to false. This AudioOutputUnitStop-call is not supposed to be blocking while called in the I/O-thread but will be waiting for a mutex created by the call made in dealloc and you've got a deadlock.

I've moved the AudioOutputUnitStop to be called directly in the AudioCapture.running-setter instead.

@chenliming777 chenliming777 merged commit 23824e2 into LaiFengiOS:master Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants