func benchmarkWaveformDraw(b *testing.B, count int) {
	values := make([]float64, count)
	for i := 0; i < b.N; i++ {
		w, err := New(nil)
		if err != nil {
			panic(err)
		}
		w.Draw(values)
	}
}
benchmarkWaveformDraw contains common logic for benchmarking Waveform.Draw
package waveform
import (
	"bytes"
	"math/rand"
	"testing"
	"time"
	"azul3d.org/engine/audio"
)
func BenchmarkGenerateWAV(b *testing.B) {
	benchmarkGenerate(b, wavFile)
}
func BenchmarkGenerateFLAC(b *testing.B) {
	benchmarkGenerate(b, flacFile)
}
func BenchmarkWaveformComputeWAV(b *testing.B) {
	benchmarkWaveformCompute(b, wavFile)
}
func BenchmarkWaveformComputeFLAC(b *testing.B) {
	benchmarkWaveformCompute(b, flacFile)
}
func BenchmarkWaveformDraw60(b *testing.B) {
	benchmarkWaveformDraw(b, 60)
}
func BenchmarkWaveformDraw120(b *testing.B) {
	benchmarkWaveformDraw(b, 120)
}
func BenchmarkWaveformDraw240(b *testing.B) {
	benchmarkWaveformDraw(b, 240)
}
func BenchmarkWaveformDraw480(b *testing.B) {
	benchmarkWaveformDraw(b, 480)
}
func BenchmarkWaveformDraw960(b *testing.B) {
	benchmarkWaveformDraw(b, 960)
}
func BenchmarkRMSF64Samples22050(b *testing.B) {
	benchmarkRMSF64Samples(b, 22050)
}
func BenchmarkRMSF64Samples44100(b *testing.B) {
	benchmarkRMSF64Samples(b, 44100)
}
func BenchmarkRMSF64Samples88200(b *testing.B) {
	benchmarkRMSF64Samples(b, 88200)
}
func BenchmarkRMSF64Samples176400(b *testing.B) {
	benchmarkRMSF64Samples(b, 176400)
}
func benchmarkGenerate(b *testing.B, data []byte) {
	for i := 0; i < b.N; i++ {
		Generate(bytes.NewReader(data))
	}
}
func benchmarkWaveformCompute(b *testing.B, data []byte) {
	for i := 0; i < b.N; i++ {
		w, err := New(bytes.NewReader(data))
		if err != nil {
			panic(err)
		}
		w.Compute()
	}
}