Fix Decode benchmark, add samples properly
This commit is contained in:
parent
bb1d87b2e6
commit
a465b24607
|
@ -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
BIN
testdata/classic.mp3
vendored
Binary file not shown.
BIN
testdata/mpeg2.mp3
vendored
BIN
testdata/mpeg2.mp3
vendored
Binary file not shown.
Loading…
Reference in a new issue