Skip to content
jfreymuthPublic

About

a native go ogg/vorbis decoder

Topics

Resources

Stars

76 stars

Watchers

1 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

oggvorbis

a native go ogg/vorbis decoder

GoDoc

Usage

This package provides the type oggvorbis.Reader, which can be used to read .ogg files.

r, err := oggvorbis.NewReader(reader)
// handle error

fmt.Println(r.SampleRate())
fmt.Println(r.Channels())

buffer := make([]float32, 8192)
for {
	n, err := r.Read(buffer)

	// use buffer[:n]

	if err == io.EOF {
		break
	}
	if err != nil {
		// handle error
	}
}

The reader also provides methods for seeking, these will only work if the reader was created from an io.ReadSeeker.

There are also convenience functions to read an entire (small) file, similar to ioutil.ReadAll.

data, format, err := oggvorbis.ReadAll(reader)

Contributing

Please note that LLM-generated contributions will not be accepted

About

a native go ogg/vorbis decoder

Topics

Resources

Stars

76 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages