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:
@@ -34,7 +34,7 @@ type LivekitServer struct {
|
||||
turnServer *turn.Server
|
||||
currentNode routing.LocalNode
|
||||
running utils.AtomicFlag
|
||||
doneChan chan bool
|
||||
doneChan chan struct{}
|
||||
}
|
||||
|
||||
func NewLivekitServer(conf *config.Config,
|
||||
@@ -126,7 +126,7 @@ func (s *LivekitServer) Start() error {
|
||||
return err
|
||||
}
|
||||
|
||||
s.doneChan = make(chan bool, 1)
|
||||
s.doneChan = make(chan struct{})
|
||||
|
||||
// ensure we could listen
|
||||
ln, err := net.Listen("tcp", s.httpServer.Addr)
|
||||
|
||||
Reference in New Issue
Block a user