vorbis

package
v0.0.0-...-15c8654 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup1Values

func Lookup1Values(entries, dimensions int) int

From the spec: The return value for this function is defined to be ’the greatest integer value for which [return_value] to the power of [codebook_dimensions] is less than or equal to [codebook_ entries]’.

func Lookup1ValuesJava

func Lookup1ValuesJava(entries, dimensions int) int

Translated from some java source somewhere, uses an iterative approach instead of a binary search

Types

type BitReader

type BitReader struct {
	// contains filtered or unexported fields
}

func MakeBitReader

func MakeBitReader(in io.ByteReader) *BitReader

func (*BitReader) CheckError

func (br *BitReader) CheckError() error

func (*BitReader) ReadBits

func (br *BitReader) ReadBits(n int) uint32

0 <= n < 32

type Codebook

type Codebook struct {
	Dimensions    int
	Entries       []CodebookEntry
	Multiplicands []uint32

	Minimum_value float64
	Delta_value   float64
	Sequence_p    bool

	// Value_vectors[entry][dimension]
	Value_vectors [][]float64
}

func (*Codebook) AssignCodewords

func (book *Codebook) AssignCodewords()

func (*Codebook) BuildVQType1

func (book *Codebook) BuildVQType1()

func (*Codebook) BuildVQType2

func (book *Codebook) BuildVQType2()

func (*Codebook) DecodeScalar

func (book *Codebook) DecodeScalar(br *BitReader) int

func (*Codebook) DecodeVector

func (book *Codebook) DecodeVector(br *BitReader) []float64

type CodebookEntry

type CodebookEntry struct {
	Unused   bool
	Length   int
	Codeword uint32
	Num      int
}

type Floor

type Floor interface {
	// If Decode returns nil it indicates that this floor curve is unused.
	Decode(*BitReader, []Codebook, int) []float64
}

type Floor0

type Floor0 struct {
	// contains filtered or unexported fields
}

func (*Floor0) Decode

func (f *Floor0) Decode(br *BitReader, codebooks []Codebook, n int) []float64

TODO: Floor0 is not done, but should be completed prior to release TODO: Need to find a vorbis file that actually uses floor0 for testing

type Floor1

type Floor1 struct {
	Xs []int
	// contains filtered or unexported fields
}

func (*Floor1) Decode

func (f *Floor1) Decode(br *BitReader, codebooks []Codebook, n int) []float64

type Mapping

type Mapping struct {
	// contains filtered or unexported fields
}

type Mode

type Mode struct {
	// contains filtered or unexported fields
}

type Residue

type Residue interface {
	Decode(br *BitReader, books []Codebook, ch int, do_not_decode []bool, n int) [][]float64
}

Jump to

Keyboard shortcuts

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