quantize.go
func Quantize(buf *audio.FloatBuffer, bitDepth int) {
	if buf == nil {
		return
	}
	max := math.Pow(2, float64(bitDepth)) - 1

	bufLen := len(buf.Data)
	for i := 0; i < bufLen; i++ {
		buf.Data[i] = round((buf.Data[i]+1)*max)/max - 1.0
	}
}
func Quantize(buf *audio.FloatBuffer, bitDepth int) {
	if buf == nil {
		return
	}
	max := math.Pow(2, float64(bitDepth)) - 1

	bufLen := len(buf.Data)
	for i := 0; i < bufLen; i++ {
		buf.Data[i] = round((buf.Data[i]+1)*max)/max - 1.0
	}
}
// Quantize quantizes the audio signal to match the target bitDepth