Fix: Add delay for audio device readiness
This commit is contained in:
parent
79c7c4a694
commit
3bbd93e578
@ -70,8 +70,10 @@ class Recorder: ObservableObject {
|
||||
if deviceID != 0 {
|
||||
do {
|
||||
try await configureAudioSession(with: deviceID)
|
||||
try? await Task.sleep(nanoseconds: 200_000_000)
|
||||
} catch {
|
||||
logger.warning("⚠️ Failed to configure audio session for device \(deviceID), attempting to continue: \(error.localizedDescription)")
|
||||
try? await Task.sleep(nanoseconds: 100_000_000)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user