Documentation
¶
Overview ¶
Interface for supported audio format implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupported = errors.New("not supported audio format")
Functions ¶
Types ¶
type Decoder ¶
type Decoder interface {
// Read decode piece of data and returns raw PCM audio data.
Read(buf []byte) (read int, err error)
// Seek sets new position in seconds to start decoding from.
Seek(pos int) error
// Time returns current decoded position in seconds.
// TODO: Time should be in millis or nanos.
Time() int
// SampleRate returns sample rate of decoded stream.
SampleRate() int
// Channels returns number of channels in decoded stream.
Channels() int
// Close releases decoder resources.
Close() error
}
Decoder interface represents audio decoder for the particular audio format.
func GetDecoder ¶
Click to show internal directories.
Click to hide internal directories.