fix: Fix a race condition that caused audio to not be configured (#2144)
* fix: Fix a race condition that caused audio to not be configured * Update CameraSession.swift * fix: Fix `audioOutput` being deleted
This commit is contained in:
parent
69baacad73
commit
1b90bc9620
@ -62,7 +62,6 @@ extension CameraSession {
|
||||
}
|
||||
photoOutput = nil
|
||||
videoOutput = nil
|
||||
audioOutput = nil
|
||||
codeScannerOutput = nil
|
||||
|
||||
// Photo Output
|
||||
|
@ -158,9 +158,6 @@ class CameraSession: NSObject, AVCaptureVideoDataOutputSampleBufferDelegate, AVC
|
||||
}
|
||||
}
|
||||
|
||||
// Update successful, set the new configuration!
|
||||
self.configuration = config
|
||||
|
||||
// Notify about Camera initialization
|
||||
if difference.inputChanged {
|
||||
self.delegate?.onSessionInitialized()
|
||||
@ -188,6 +185,9 @@ class CameraSession: NSObject, AVCaptureVideoDataOutputSampleBufferDelegate, AVC
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// After configuring, set this to the new configuration.
|
||||
configuration = config
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user