-
|
Hi everyone, I tested with both HaishinKit 2.0.9 and 2.1. Result:
Questions:
Code used (same as in the Example): func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
let session = AVAudioSession.sharedInstance()
guard let preferredInput = session.preferredInput,
let newDataSource = preferredInput.dataSources?[row] else {
return
}
do {
try preferredInput.setPreferredDataSource(newDataSource)
} catch {
logger.warn("can't set supported setPreferredDataSource")
}
// App freezes here
await mixer.attachAudio(AVCaptureDevice.default(for: .audio))
}Test environment:
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Yes. Starting from around iOS 17 or 18, when AVCaptureSession has await mixer.stopCapturing()
await mixer.attachAudio(AVCaptureDevice.default(for: .audio))
await mixer.startCapturing() |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Thank you so much. I will check it out. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, When switching microphones, the screen briefly freezes and the experience isn’t very smooth. Additionally, is there any way to select a Bluetooth headset as the audio input? At the moment, when I attach audio, I can’t choose a Bluetooth device such as AirPods. Thank you in advance for your support! |
Beta Was this translation helpful? Give feedback.
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: