Versions in this module Expand all Collapse all v3 v3.0.1 May 18, 2021 Changes in this version + const ScheduleFilename + func SaveScheduleIfNew(audioDir string, newSchedule *Schedule) (new bool, err error) + type ActualClock struct + func (t *ActualClock) Now() time.Time + func (t *ActualClock) Wait(duration time.Duration) + type Clock interface + Now func() time.Time + Wait func(time.Duration) + type Combo struct + Every int + From TimeOfDay + Sounds []string + Trigger string + Until TimeOfDay + Volumes []int + Waits []int + type Player struct + type Schedule struct + AllSounds []int + Combos []Combo + ControlNights int + Description string + PlayNights int + StartDay int + func GetScheduleFromAPI(api *api.CacophonyAPI) (*Schedule, error) + func LoadScheduleFromDisk(audioDir string) (*Schedule, error) + func (schedule *Schedule) CycleLength() int + func (schedule *Schedule) GetReferencedSounds() []int + type SchedulePlayer struct + func NewPlayer(allSoundsMap map[int]string, filesDirectory string) *SchedulePlayer + func (sp *SchedulePlayer) SetRecorder(recorder SoundPlayedRecorder) + func (sp SchedulePlayer) IsSoundPlayingDay(schedule Schedule) bool + func (sp SchedulePlayer) PlayTodaysSchedule(schedule Schedule) + func (sp SchedulePlayer) TimeUntilNextCombo(schedule Schedule) time.Duration + type SoundChooser struct + func NewSoundChooser(allSoundsMap map[int]string) *SoundChooser + func NewSoundChooserWithRandom(allSoundsMap map[int]string, seed int64) *SoundChooser + func (chooser *SoundChooser) ChooseSound(choice string) (int, string) + type SoundPlayedRecorder interface + OnAudioBaitPlayed func(ts time.Time, fileId int, volume int) + type TimeOfDay struct + func NewTimeOfDay(timeOfDayString string) *TimeOfDay + func (t *TimeOfDay) MarshalJSON() ([]byte, error) + func (timeOfDay *TimeOfDay) UnmarshalJSON(bValue []byte) (err error) Other modules containing this package github.com/TheCacophonyProject/audiobait