decoder

package
v0.0.0-...-0f84665 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

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

func NewOpusDecoder

func NewOpusDecoder(sample_rate int, channels int) (*Decoder, error)

NewDecoder allocates a new Opus decoder and initializes it with the appropriate parameters. All related memory is managed by the Go GC.

func (*Decoder) Init

func (dec *Decoder) Init(sample_rate int, channels int) error

func (*Decoder) Read

func (dec *Decoder) Read(pcm []byte) (int, error)

这里做一个fifo,wirte在on.track中调用,read在play中调用

func (*Decoder) SetOpusData

func (dec *Decoder) SetOpusData(data []byte) error

func (*Decoder) Write

func (dec *Decoder) Write(pcm []byte) (int, error)

Jump to

Keyboard shortcuts

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