Documentation
¶
Overview ¶
mad is MPEG Audio Decoder.
Index ¶
- Constants
- type Decoder
- func (decoder *Decoder) Channels() int
- func (decoder *Decoder) Close()
- func (decoder *Decoder) CurrentPosition() int
- func (decoder *Decoder) Length() int
- func (decoder *Decoder) Read(buf []byte) int
- func (decoder *Decoder) SampleRate() int
- func (decoder *Decoder) Seek(position int, whence Whence) os.Error
- type Whence
Constants ¶
const ( // Set new position relative to the start. SeekSet = iota // Set new position related to the current one. SeekCurrent )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
File structure represents MP3 file.
func (*Decoder) Close ¶
func (decoder *Decoder) Close()
Close release resources assigned to Decoder structure and close MAD decoder.
func (*Decoder) CurrentPosition ¶
CurrentPosition returns current decoding position, in seconds.
func (*Decoder) Read ¶
Read returns up to the specified number of bytes of decoded PCM audio. Return number of read 16-bit words.
func (*Decoder) SampleRate ¶
SampleRate returns file's sample rate value.
func (*Decoder) Seek ¶
Seek move decoding position. If whence parameter is SeekSet than position parameter should be non-negative integer value, which is new decoding position relative to the start of the file. If whence equals SeekCurrent than position parameter can be negative as well as positive integer, which means new position related to the current one.