revid: update encder test to use Rate() with float argument

This commit is contained in:
Trek H 2020-08-14 13:07:03 +09:30
parent d13d02e21a
commit 5ad8a6ed2d
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ func TestEncodePcm(t *testing.T) {
sampleSize := 2
blockSize := 16000
writeFreq := float64(sampleRate*sampleSize) / float64(blockSize)
e, err := NewEncoder(nopCloser{&buf}, (*testLogger)(t), PacketBasedPSI(10), Rate(int(writeFreq)), MediaType(EncodeAudio))
e, err := NewEncoder(nopCloser{&buf}, (*testLogger)(t), PacketBasedPSI(10), Rate(writeFreq), MediaType(EncodeAudio))
if err != nil {
t.Fatalf("could not create MTS encoder, failed with error: %v", err)
}