Documentation ¶
Overview ¶
Encode raw pcm to opus (ogg) audio with cgo libopus binding.
Index ¶
- Constants
- Variables
- type Encoder
- func (e *Encoder) Close()
- func (e *Encoder) CreateSilence(d time.Duration) (*Silence, error)
- func (e *Encoder) EncodeFloat(input []float32) ([]byte, error)
- func (e *Encoder) EncodeInt16(input []int16) ([]byte, error)
- func (e *Encoder) EncodeRaw(input []byte) ([]byte, error)
- func (e *Encoder) EncodeSilence(s *Silence) ([]byte, error)
- func (e *Encoder) StreamHeader() []byte
- type EncoderConfig
- type Silence
Constants ¶
View Source
const ( APPLICATION_VOIP = 2048 APPLICATION_AUDIO = 2049 APPLICATION_RESTRICTED_LOWDELAY = 2051 FRAMING_NONE = 0 FRAMING_OGG = 1 )
Variables ¶
View Source
var DefaultConfig = EncoderConfig{48000, 2, APPLICATION_AUDIO, FRAMING_OGG}
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct { EncoderConfig // contains filtered or unexported fields }
func NewEncoder ¶
func NewEncoder(c EncoderConfig) (*Encoder, error)
func (*Encoder) StreamHeader ¶
type EncoderConfig ¶
Click to show internal directories.
Click to hide internal directories.