Moving smoothing into the audio level module. (#636)

This commit is contained in:
Raja Subramanian
2022-04-20 23:59:51 +05:30
committed by GitHub
parent 6a53891f9f
commit 43d0573693
11 changed files with 93 additions and 124 deletions
+2 -2
View File
@@ -628,12 +628,12 @@ func (b *Buffer) GetDeltaStats() *StreamStatsWithLayers {
}
}
func (b *Buffer) GetAudioLevel() (uint8, bool) {
func (b *Buffer) GetAudioLevel() (float64, bool) {
b.RLock()
defer b.RUnlock()
if b.audioLevel == nil {
return audio.SilentAudioLevel, false
return 0, false
}
return b.audioLevel.GetLevel()