mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 15:12:43 +00:00
Enhancement: audio speakers (#44)
* refactor: active speakers 1. Observe the loudest adjusted with active ratio instead of linear average of decibel values 2. Follow RFC6465 to convert audio level from decibel to linear value. 3. Quantize audio level for stable slice comparison 4. Switch moving average algorithm from MMA to EMA to have the same center of mass with SMA 5. Minor: remove seenSids map allocation 6. Minor: minimize division arithmetic * Update pkg/rtc/audiolevel.go Co-authored-by: David Zhao <david@davidzhao.com>
This commit is contained in:
1 parent
1fd858a16b
commit
dcfe7eaf4f
12 files changed
+103
-86
No files matched your search
@@ -23,7 +23,6 @@ type TrackWriter struct {
|
||||
track *webrtc.TrackLocalStaticSample
|
||||
filePath string
|
||||
mime string
|
||||
done chan bool
|
||||
|
||||
ogg *oggreader.OggReader
|
||||
ivfheader *ivfreader.IVFFileHeader
|
||||
@@ -39,7 +38,6 @@ func NewTrackWriter(ctx context.Context, track *webrtc.TrackLocalStaticSample, f
|
||||
track: track,
|
||||
filePath: filePath,
|
||||
mime: track.Codec().MimeType,
|
||||
done: make(chan bool),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user