Documentation ¶
Index ¶
- Constants
- Variables
- func CountFrames(data []byte) (int, error)
- type Application
- type Decoder
- type Encoder
- func (e *Encoder) Application() Application
- func (e *Encoder) Bitrate() int
- func (e *Encoder) Encode(pcm []int16, frameSize, maxDataBytes int) ([]byte, error)
- func (e *Encoder) ResetState()
- func (e *Encoder) SetApplication(application Application)
- func (e *Encoder) SetBitrate(bitrate int)
- func (e *Encoder) SetVbr(vbr bool)
Constants ¶
View Source
const (
BitrateMaximum = C.gopus_bitrate_max
)
Variables ¶
View Source
var ( ErrBadArgument = errors.New("bad argument") ErrSmallBuffer = errors.New("buffer is too small") ErrInternal = errors.New("internal error") ErrInvalidPacket = errors.New("invalid packet") ErrUnimplemented = errors.New("unimplemented") ErrInvalidState = errors.New("invalid state") ErrAllocFail = errors.New("allocation failed") ErrUnknown = errors.New("unknown error") )
Functions ¶
func CountFrames ¶
Types ¶
type Application ¶
type Application int
const ( Voip Application = C.gopus_application_voip Audio Application = C.gopus_application_audio RestrictedLowDelay Application = C.gopus_restricted_lowdelay )
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) ResetState ¶
func (d *Decoder) ResetState()
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoder(sampleRate, channels int, application Application) (*Encoder, error)
func (*Encoder) Application ¶
func (e *Encoder) Application() Application
func (*Encoder) ResetState ¶
func (e *Encoder) ResetState()
func (*Encoder) SetApplication ¶
func (e *Encoder) SetApplication(application Application)
func (*Encoder) SetBitrate ¶
Click to show internal directories.
Click to hide internal directories.