Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedReadSeeker ¶
type BufferedReadSeeker struct {
// contains filtered or unexported fields
}
BufferedReadSeeker represents a buffered seekable buffer which allows io.ReadCloser to be seeked. BufferedReadSeeker will read the stream as needed and keep it in memory until closed and does not support io.SeekEnd
func (*BufferedReadSeeker) Close ¶
func (s *BufferedReadSeeker) Close() (err error)
Close closes the underlying ReadCloser
type MP3Decoder ¶
type MP3Decoder struct {
// contains filtered or unexported fields
}
MP3Decoder represents a mp3 decoding stream
func NewMP3Decoder ¶
func NewMP3Decoder(stream io.ReadCloser) (decoder *MP3Decoder, err error)
NewMP3Decoder returns a 16bit/48khz PCM stream with provided mp3 stream
func (*MP3Decoder) Close ¶
func (decoder *MP3Decoder) Close() (err error)
Close closes the mp3 stream and the underlying stream
type OpusDecoder ¶
type OpusDecoder struct {
// contains filtered or unexported fields
}
OpusDecoder represents a opus decoding stream
func NewOpusDecoder ¶
func NewOpusDecoder(stream io.Reader, sampleRate, channels int) (decoder *OpusDecoder, err error)
NewOpusDecoder returns a new 16bit/48khz PCM stream with the provided opus stream
func (*OpusDecoder) Close ¶
func (decoder *OpusDecoder) Close() (err error)
Close closes the opus decoding stream and the underlying stream
type VorbisDecoder ¶
type VorbisDecoder struct {
// contains filtered or unexported fields
}
VorbisDecoder represents a vorbis decoding stream
func NewVorbisDecoder ¶
func NewVorbisDecoder(stream io.ReadCloser) (decoder *VorbisDecoder, err error)
NewVorbisDecoder returns a 16bit/48khz PCM stream with provided vorbis stream
func (*VorbisDecoder) Close ¶
func (decoder *VorbisDecoder) Close() (err error)
Close closes the Vorbis stream and the underlying stream
type WebMDecoder ¶
type WebMDecoder struct {
// contains filtered or unexported fields
}
WebMDecoder represents a WebM decoding stream.
BUG(TrungNguyen1909): The WebMDecoder will buffer the whole stream until close because webm requires a seekable stream.
func NewWebMDecoder ¶
func NewWebMDecoder(stream io.ReadCloser) (decoder *WebMDecoder, err error)
NewWebMDecoder returns a new 16bit/48khz PCM audio stream with the provided WebM stream
BUG(TrungNguyen1909): Only WebM stream with opus audio is supported.
func (*WebMDecoder) Close ¶
func (decoder *WebMDecoder) Close() (err error)
Close closes the webm decoding stream and the underlying stream
Notes ¶
Bugs ¶
The WebMDecoder will buffer the whole stream until close because webm requires a seekable stream.
Only WebM stream with opus audio is supported.