Smooth audio levels by averaging over samples.

This commit is contained in:
David Zhao
2021-06-21 18:14:28 -07:00
parent 5d2fb3c09a
commit d69e9f451e
5 changed files with 87 additions and 18 deletions
+1 -1
View File
@@ -65,6 +65,6 @@ func (l *AudioLevel) GetLevel() (level uint8, noisy bool) {
return
}
func convertAudioLevel(level uint8) float32 {
func ConvertAudioLevel(level uint8) float32 {
return (127 - float32(level)) / 127
}