]> Sergey Matveev's repositories - go-opus.git/commitdiff
Comparing samples returned from decode with frame size in fec tests
authorelinor <elinor.alp@gmail.com>
Mon, 2 Apr 2018 11:38:09 +0000 (14:38 +0300)
committerelinor <elinor.alp@gmail.com>
Mon, 2 Apr 2018 11:38:09 +0000 (14:38 +0300)
opus_test.go

index 3e407e36c63276726af89cab4291e24883d94f51..dfb548b1cd383ed731bc5d1211f6ee34851fb0d1 100644 (file)
@@ -154,7 +154,7 @@ func TestCodecFEC(t *testing.T) {
                        t.Fatalf("Couldn't decode data: %v", err)
                }
                pcmBuffer = pcmBuffer[:n]
-               if len(pcmBuffer) != n {
+               if n != FRAME_SIZE {
                        t.Fatalf("Length mismatch: %d samples in, %d out", len(pcmBuffer), n)
                }
                pcm = append(pcm, pcmBuffer...)
@@ -237,7 +237,7 @@ func TestCodecFECFloat32(t *testing.T) {
                        t.Fatalf("Couldn't decode data: %v", err)
                }
                pcmBuffer = pcmBuffer[:n]
-               if len(pcmBuffer) != n {
+               if n != FRAME_SIZE {
                        t.Fatalf("Length mismatch: %d samples in, %d out", len(pcmBuffer), n)
                }
                pcm = append(pcm, pcmBuffer...)