Implement alarm sound
This commit is contained in:
parent
b7dbc597d8
commit
df31c4dcd1
15 changed files with 531 additions and 50 deletions
|
|
@ -16,6 +16,7 @@ func (c *Config) declareFlags() {
|
|||
flag.StringVar(&c.GongsDir, "gongs-dir", c.GongsDir, "Path to the directory containing the gongs")
|
||||
flag.StringVar(&c.ActionsDir, "actions-dir", c.ActionsDir, "Path to the directory containing the actions")
|
||||
flag.StringVar(&c.RoutinesDir, "routines-dir", c.RoutinesDir, "Path to the directory containing the routines")
|
||||
flag.IntVar(&c.SampleRate, "samplerate", c.SampleRate, "Samplerate for unifying output stream")
|
||||
|
||||
// Others flags are declared in some other files when they need specials configurations
|
||||
}
|
||||
|
|
@ -30,6 +31,7 @@ func Consolidated() (cfg *Config, err error) {
|
|||
GongsDir: "./gongs/",
|
||||
ActionsDir: "./actions/",
|
||||
RoutinesDir: "./routines/",
|
||||
SampleRate: 44100,
|
||||
}
|
||||
|
||||
cfg.declareFlags()
|
||||
|
|
|
|||
|
|
@ -6,16 +6,19 @@ import (
|
|||
)
|
||||
|
||||
type Config struct {
|
||||
DevProxy string
|
||||
Bind string
|
||||
ExternalURL URL
|
||||
BaseURL string
|
||||
DevProxy string
|
||||
Bind string
|
||||
ExternalURL URL
|
||||
BaseURL string
|
||||
|
||||
LevelDBPath string
|
||||
SettingsFile string
|
||||
TracksDir string
|
||||
GongsDir string
|
||||
ActionsDir string
|
||||
RoutinesDir string
|
||||
|
||||
SampleRate int
|
||||
}
|
||||
|
||||
// parseLine treats a config line and place the read value in the variable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue