Fix Decode benchmark, add samples properly

This commit is contained in:
DataHoarder 2022-12-05 09:30:31 +01:00
parent bb1d87b2e6
commit a465b24607
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
3 changed files with 4 additions and 1 deletions

View file

@ -36,9 +36,12 @@ func BenchmarkDecode(b *testing.B) {
b.Fatal(err)
}
data := make([]float32, 0, 64)
data := make([]float32, 128)
for {
if _, err := d.ReadFloat(data); err != nil {
if err == io.EOF {
break
}
b.Fatal(err)
}
}

BIN
testdata/classic.mp3 vendored

Binary file not shown.

BIN
testdata/mpeg2.mp3 vendored

Binary file not shown.