Documentation
¶
Index ¶
- func Wait()
- type BaseMelody
- type Cantor
- type Clock
- type Melody
- type Music
- func (m *Music) AddMainMelody(melody *Melody, bufLen int) (id string)
- func (m *Music) AddSubMelody(mainID string, melody *Melody, bufLen int) (id string, ok bool)
- func (m *Music) Build(id string) (t *Track, total int)
- func (m *Music) BuildChan(tc *TrackChan) (t *Track, total int)
- func (m *Music) ConnectMelody(m1 string, m2 string) (ok bool)
- func (m *Music) Get(id string) (tc *TrackChan, ok bool)
- type Track
- type TrackChan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseMelody ¶
type BaseMelody struct { }
BaseMelody - simple Impl
func (BaseMelody) Play ¶
func (BaseMelody) Play(t *Track, in interface{}) interface{}
Play - impl melody
type Cantor ¶
type Cantor struct { MaxTrack int // contains filtered or unexported fields }
Cantor - then controller
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock - clock
type Melody ¶
type Melody interface {
Play(*Track, interface{}) interface{}
}
Melody - the payload of task
type Music ¶
type Music struct {
// contains filtered or unexported fields
}
Music - the factory of task
func (*Music) AddMainMelody ¶
AddMainMelody - add melody
func (*Music) AddSubMelody ¶
AddSubMelody - add & connect melody Warning: not equal to `ConnectMelody(mainID, AddMainMelody(melody))`
func (*Music) ConnectMelody ¶
ConnectMelody - connect melody
Click to show internal directories.
Click to hide internal directories.