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
+3 -3
View File
@@ -306,8 +306,8 @@ func TestActiveSpeakers(t *testing.T) {
participants := rm.GetParticipants()
p := participants[0].(*typesfakes.FakeLocalParticipant)
p2 := participants[1].(*typesfakes.FakeLocalParticipant)
p.GetAudioLevelReturns(10, true)
p2.GetAudioLevelReturns(20, true)
p.GetAudioLevelReturns(20, true)
p2.GetAudioLevelReturns(10, true)
speakers := rm.GetActiveSpeakers()
require.Len(t, speakers, 2)
@@ -361,7 +361,7 @@ func TestActiveSpeakers(t *testing.T) {
p := participants[0].(*typesfakes.FakeLocalParticipant)
op := participants[1].(*typesfakes.FakeLocalParticipant)
p.GetAudioLevelReturns(30, true)
convertedLevel := audio.ConvertAudioLevel(30)
convertedLevel := float32(audio.ConvertAudioLevel(30))
testutils.WithTimeout(t, func() string {
updates := getActiveSpeakerUpdates(op)