vorbis

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: GPL-3.0 Imports: 9 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.

Jump to

Keyboard shortcuts

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