internal

package
v0.0.0-...-94216e4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = logr.New()

Functions

This section is empty.

Types

type OpusDecoder

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

func NewOpusDecoder

func NewOpusDecoder(sampleRate, channels int) (*OpusDecoder, error)

func (*OpusDecoder) Decode

func (o *OpusDecoder) Decode(data []byte, buf []float32) (int, error)

type OpusEncoder

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

func NewOpusEncoder

func NewOpusEncoder(channels, frameSizeMs int) (*OpusEncoder, error)

func (*OpusEncoder) Encode

func (o *OpusEncoder) Encode(pcm []float32, inputChannelCount, inputSampleRate int) ([]OpusFrame, error)

Encode will resample and encode the provided pcm audio to 48khz Opus

type OpusFrame

type OpusFrame struct {
	Data  []byte
	Index int
}

OpusFrame contains and encoded opus frame

type PcmFrame

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

PcmFrame is used for chunking raw pcm input into frames for the opus encoder

Jump to

Keyboard shortcuts

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