Skip to content
Discussion options

You must be logged in to vote

Is there a way to fix the freeze when switching the microphone?

Yes. Starting from around iOS 17 or 18, when AVCaptureSession has isRunning = true, attaching a device causes a freeze.
Therefore, it’s better to stop it once as shown below:

await mixer.stopCapturing()
await mixer.attachAudio(AVCaptureDevice.default(for: .audio))
await mixer.startCapturing()

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by noho501
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@shogo4405
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants