vorbis

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

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

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 (d *Decoder) PositionMs() int64

func (*Decoder) Read

func (d *Decoder) Read(p []float32) (n int, err error)

func (*Decoder) SetPositionMs

func (d *Decoder) SetPositionMs(pos int64) (err error)

type Info

type Info struct {
	Channels   int32
	SampleRate int32
	Comments   []string
	Vendor     string
}

Info represents basic information about the audio in a Vorbis bitstream.

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) GetAlbumFactor added in v0.1.3

func (m MetadataPage) GetAlbumFactor(normalisationPregain float32) float32

func (MetadataPage) GetSeekPosition added in v0.1.3

func (m MetadataPage) GetSeekPosition(samplesPos int64) int64

func (MetadataPage) GetTrackFactor added in v0.1.3

func (m MetadataPage) GetTrackFactor(normalisationPregain float32) float32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL