func (buf *FloatBuffer) AsIntBuffer() *IntBuffer {
	newB := &IntBuffer{}
	newB.Data = make([]int, len(buf.Data))
	for i := 0; i < len(buf.Data); i++ {
		newB.Data[i] = int(buf.Data[i])
	}
	newB.Format = &Format{
		NumChannels: buf.Format.NumChannels,
		SampleRate:  buf.Format.SampleRate,
	}
	return newB
}
AsIntBuffer returns a copy of this buffer but with data truncated to Ints.
package audio
var _ Buffer = (*FloatBuffer)(nil)
var _ Buffer = (*Float32Buffer)(nil)
type FloatBuffer struct {
	Format *Format
	Data []float64
}
func (buf *FloatBuffer) PCMFormat() *Format { return buf.Format }
func (buf *FloatBuffer) AsFloatBuffer() *FloatBuffer { return buf }
func (buf *FloatBuffer) AsFloat32Buffer() *Float32Buffer {
	newB := &Float32Buffer{}
	newB.Data = make([]float32, len(buf.Data))
	for i := 0; i < len(buf.Data); i++ {
		newB.Data[i] = float32(buf.Data[i])
	}
	newB.Format = &Format{
		NumChannels: buf.Format.NumChannels,
		SampleRate:  buf.Format.SampleRate,
	}
	return newB
}