Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferStatus ¶ added in v0.5.0
type BufferStatus struct {
// Tmin and Tmax denote the lowest and highest wall clock time in the buffer
Tmin, Tmax time.Time
// Tahead is the length of the buffer (in milliseconds) added but not yet available for reading
Tahead float32
// Tbehind is the length of the buffer (in milliseconds) available for reading as of the current time
Tbehind float32
// BufferSize is the size (in bytes) added but not yet available for reading
BufferSize int
// TotalSize is the total size (in bytes) of the buffer
TotalSize int
}
type ChunkStream ¶
A ChunkStream wraps a single read session initiated from a Chunker
type Chunker ¶
type Chunker interface { wavreader.Writer NewStream() (ChunkStream, error) NewStreamWithOffset(time.Duration) (ChunkStream, error) // SetAssociatedData allows one to store arbitrary data at this time index SetAssociatedData(interface{}) // GetAssociatedData retrieves the most recent data stored at or before the current time index GetAssociatedData() (interface{}, error) }
A Chunker is a buffered writer that breaks up audio into chunks made available for reading later.
type MP3ChunkConfig ¶ added in v0.4.0
func (MP3ChunkConfig) NewMP3 ¶ added in v0.4.0
func (m MP3ChunkConfig) NewMP3() (Chunker, error)
type Statuser ¶ added in v0.5.0
type Statuser interface {
BufferStatus() BufferStatus
}
type WAVChunkConfig ¶ added in v0.5.0
type WAVChunkConfig struct { StreamFormat wavreader.StreamFormat ReadAhead time.Duration ReadBehind time.Duration }
func (WAVChunkConfig) New ¶ added in v0.5.0
func (c WAVChunkConfig) New() (Chunker, error)
Click to show internal directories.
Click to hide internal directories.