Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mixer ¶
type Mixer struct { Output chan []byte CurrentSongPath string // contains filtered or unexported fields }
Mixer is in charge of interacting with the queue and resource cache to go from a queue of song hashes to a stream of audio data. It has logic to ensure minimal delay between songs by processing current/next in parallel. Mixer can be considered the key component that ties together all the rest
func NewMixer ¶
Packets-per-second sacrifices reliability for synchronization Higher means more synchornized streams. Minimum should be 1, super large values have undefined behaviour 2 is a reasonable default
func (*Mixer) Pause ¶
func (m *Mixer) Pause()
Will toggle playing by preventing writes to output TODO: FiX THIS. BORKED AS HELL https://github.com/VivaLaPanda/uta-stream/issues/3 If people keep calling pause then it will keep spawning deadlocked routines until someone hits play, at which point all extra paused routines will die Need someway to check mutex or some different pause approach entirely