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. If rel // parameter is set new position will be calculated as current plus // pos, otherwise pos is an absolute seconds position. Seek(pos int, rel bool) error // Time returns current decoded position in seconds. 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() }
Decoder interface represents audio decoder for the particular audio format.
func GetDecoder ¶
Click to show internal directories.
Click to hide internal directories.