Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DataChunkSize represents the amount of data read from physical bitstream on each iteration. DataChunkSize = 4096 // could be also 8192 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
sync.Mutex
SampleRate int32
Channels int32
// contains filtered or unexported fields
}
Decoder implements an OggVorbis decoder.
func New ¶
func New(log librespot.Logger, r librespot.SizedReadAtSeeker, meta *MetadataPage, gain float32) (*Decoder, error)
New creates and initialises a new OggVorbis decoder for the provided bytestream.
func (*Decoder) Close ¶
func (d *Decoder) Close()
Close stops and finalizes the decoding process, releases the allocated resources. Puts the decoder into an unrecoverable state.
func (*Decoder) PositionMs ¶
func (*Decoder) SetPositionMs ¶
type MetadataPage ¶ added in v0.1.3
type MetadataPage struct {
// contains filtered or unexported fields
}
func ExtractMetadataPage ¶ added in v0.1.3
func ExtractMetadataPage(log librespot.Logger, r io.ReaderAt, limit int64) (librespot.SizedReadAtSeeker, *MetadataPage, error)
func (MetadataPage) GetSeekPosition ¶ added in v0.1.3
func (m MetadataPage) GetSeekPosition(samplesPos int64) int64
Click to show internal directories.
Click to hide internal directories.