2025-10-23 13:06:22 +07:00

24 lines
352 B
Go

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
}