package audio import ( "errors" ) var ( ErrInvalidBuffer = errors.New("invalid buffer") ) type Format struct { NumChannels int SampleRate int } type Buffer interface { PCMFormat() *Format NumFrames() int AsFloatBuffer() *FloatBuffer AsFloat32Buffer() *Float32Buffer AsIntBuffer() *IntBuffer Clone() Buffer }