Open Sureshkumars opened 6 years ago
@sindresorhus Please check your email. Have shared the videos which explain the issue clearly. Let me know if you need any more information.
@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.
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.
"Released" in what sense? Can you elaborate?