File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Sources/StreamVideo/Utils/AudioSession/AudioDeviceModule Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ protocol AudioEngineNodeAdapting {
2525/// analytics consumers.
2626final class AudioEngineLevelNodeAdapter : AudioEngineNodeAdapting {
2727
28+ enum Constant {
29+ // The down limit of audio pipeline in DB that is considered silence.
30+ static let silenceDB : Float = - 160
31+ }
32+
2833 var subject : CurrentValueSubject < Float , Never > ?
2934
3035// private let publisher: (Float) -> Void
@@ -62,7 +67,7 @@ final class AudioEngineLevelNodeAdapter: AudioEngineNodeAdapting {
6267 if let mixer = inputTap, mixer. engine != nil {
6368 mixer. removeTap ( onBus: 0 )
6469 }
65- subject? . send ( - 160 )
70+ subject? . send ( Constant . silenceDB )
6671 inputTap = nil
6772 log. debug ( " Input node uninstalled " , subsystems: . audioRecording)
6873 }
You can’t perform that action at this time.
0 commit comments