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

External audio devices are not getting released after stopping the recording. #54

Open
Sureshkumars opened this issue Mar 1, 2018 · 4 comments

Comments

@Sureshkumars
Copy link

No description provided.

@sindresorhus
Copy link
Member

"Released" in what sense? Can you elaborate?

@Sureshkumars
Copy link
Author

@sindresorhus Please check your email. Have shared the videos which explain the issue clearly. Let me know if you need any more information.

@Sureshkumars
Copy link
Author

@sindresorhus Found the issue. The reason why the audio output is not released is, aperture process gets killed before session.stoprunning gets completed. Adding a dispatch queue timer for 5 seconds or adding notification observer for the capture session solves the issue.

@sindresorhus
Copy link
Member

Adding a dispatch queue timer for 5 seconds or adding notification observer for the capture session solves the issue.

That's weird because according to the docs, the stopRunning() method is synchronous:

This method is used to stop the flow of data from the inputs to the outputs connected to the AVCaptureSession instance that is the receiver. This method is synchronous and blocks until the receiver has completely stopped running. - https://developer.apple.com/documentation/avfoundation/avcapturesession/1385661-stoprunning#

And the process is not force killed, so it should be able to finish.

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

No branches or pull requests

2 participants