Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeOpusAudio ¶ added in v0.1.2
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 NewOpusAudioStreamDecoder ¶ added in v0.1.2
func NewOpusAudioStreamDecoder(sampleRate int, numChannels int) AudioStreamDecoder
func NewPCMAudioStreamDecoder ¶
func NewPCMAudioStreamDecoder(sampleRate int, numChannels int) AudioStreamDecoder
type DecoderType ¶
type DecoderType string
const ( DecoderTypePCM DecoderType = "pcm" DecoderTypeMP3 DecoderType = "mp3" DecoderTypeOpus DecoderType = "opus" )
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 OpusAudioStreamDecoder ¶ added in v0.1.2
type OpusAudioStreamDecoder struct {
// contains filtered or unexported fields
}
func (*OpusAudioStreamDecoder) Close ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) Close() error
func (*OpusAudioStreamDecoder) EndInput ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) EndInput()
func (*OpusAudioStreamDecoder) Next ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) Next() (*model.AudioFrame, error)
func (*OpusAudioStreamDecoder) Push ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) 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.