codecs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioStreamDecoder

type AudioStreamDecoder interface {
	Push(data []byte)
	EndInput()
	Next() (*model.AudioFrame, error)
	Close() error
}

AudioStreamDecoder is a generic interface for decoding compressed audio formats (like MP3, WAV, FLAC) into raw PCM AudioFrames suitable for LiveKit WebRTC output.

func NewMP3AudioStreamDecoder

func NewMP3AudioStreamDecoder() AudioStreamDecoder

func NewPCMAudioStreamDecoder

func NewPCMAudioStreamDecoder(sampleRate int, numChannels int) AudioStreamDecoder

type DecoderType

type DecoderType string
const (
	DecoderTypePCM DecoderType = "pcm"
	DecoderTypeMP3 DecoderType = "mp3"
)

type MP3AudioStreamDecoder

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

func (*MP3AudioStreamDecoder) Close

func (d *MP3AudioStreamDecoder) Close() error

func (*MP3AudioStreamDecoder) EndInput

func (d *MP3AudioStreamDecoder) EndInput()

func (*MP3AudioStreamDecoder) Next

func (*MP3AudioStreamDecoder) Push

func (d *MP3AudioStreamDecoder) Push(data []byte)

type PCMAudioStreamDecoder

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

PCMAudioStreamDecoder implements AudioStreamDecoder for raw PCM streams

func (*PCMAudioStreamDecoder) Close

func (d *PCMAudioStreamDecoder) Close() error

func (*PCMAudioStreamDecoder) EndInput

func (d *PCMAudioStreamDecoder) EndInput()

func (*PCMAudioStreamDecoder) Next

func (*PCMAudioStreamDecoder) Push

func (d *PCMAudioStreamDecoder) Push(data []byte)

Jump to

Keyboard shortcuts

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