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 (d *MP3AudioStreamDecoder) Next() (*model.AudioFrame, error)
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 (d *PCMAudioStreamDecoder) Next() (*model.AudioFrame, error)
func (*PCMAudioStreamDecoder) Push ¶
func (d *PCMAudioStreamDecoder) Push(data []byte)
Click to show internal directories.
Click to hide internal directories.