]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - m4/lls/mixer.suite.m4
Convert para_fade to subcommands, rename it to para_mixer.
[paraslash.git] / m4 / lls / mixer.suite.m4
diff --git a/m4/lls/mixer.suite.m4 b/m4/lls/mixer.suite.m4
new file mode 100644 (file)
index 0000000..83d6ad9
--- /dev/null
@@ -0,0 +1,222 @@
+m4_define(PROGRAM, para_mixer)
+m4_define(DEFAULT_CONFIG_FILE, ~/.paraslash/mixer.conf)
+[suite mixer]
+version-string = GIT_VERSION()
+caption = List of subcommands
+[supercommand para_mixer]
+       purpose = alarm clock and volume-fader for OSS and ALSA
+       synopsis = [<options>] -- [<subcommand>] [<subcommand_options>]
+       [description]
+               para_mixer adjusts the settings of an audio mixing device. It can
+               set the level of a mixer channel, or fade the level from one value
+               to another in a given time period. The sleep and snooze subcommands
+               contact para_server to start or stop streaming.
+       [/description]
+       m4_include(common-option-section.m4)
+       m4_include(help.m4)
+       m4_include(detailed-help.m4)
+       m4_include(version.m4)
+       m4_include(config-file.m4)
+       m4_include(loglevel.m4)
+       m4_include(per-command-options-section.m4)
+       [help]
+               These options apply to several subcommands.
+       [/help]
+       [option mixer-api]
+               short_opt = a
+               summary = select alternative mixer API
+               arg_info = required_arg
+               arg_type = string
+               typestr = api
+               [help]
+                       ALSA is preferred over OSS if both APIs are supported and this option
+                       is not given. To see the supported mixer APIs, use this option with
+                       an invalid string as the mixer API, e.g. --mixer-api help.
+               [/help]
+       [option mixer-device]
+               short_opt = m
+               summary = set mixer device
+               arg_info = required_arg
+               arg_type = string
+               typestr = device
+               [help]
+                       The default device (used if this option is not given) depends
+                       on the selected mixer API. For ALSA, the default is 'hw:0' which
+                       corresponds to the first sound device. For OSS, '/dev/mixer' is used
+                       as the default.
+               [/help]
+       [option mixer-channel]
+               short_opt = C
+               summary = select a mixer channel
+               arg_info = required_arg
+               arg_type = string
+               typestr = channel
+               [help]
+                       For the ALSA mixer API, the possible values are determined at runtime
+                       depending on the hardware and can be printed by specifying an invalid
+                       mixer channel, for example --mixer-channel help. The default channel is
+                       'Master'.
+
+                       For OSS the possible values are invariably 'volume', 'bass', 'treble',
+                       'synth', 'pcm', 'speaker', 'line', 'mic', 'cd', 'imix', 'altpcm',
+                       'reclev', 'igain', 'ogain'. However, not all listed channels might be
+                       supported on any particular hardware. The default channel is 'volume'.
+               [/help]
+[subcommand help]
+       purpose = print subcommand help
+       non-opts-name = [<subcommand>]
+       [option long]
+               summary = print the long help text
+               short_opt = l
+
+[subcommand set]
+       purpose = set a channel to the given value and exit
+       [option val]
+               summary = mixer channel value to set
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = value
+               default_val = 10
+[subcommand fade]
+       purpose = fade a channel to the given value in the given time
+       [option fade-vol]
+               short_opt = f
+               summary = destination volume for fading
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = volume
+               default_val = 50
+       [option fade-time]
+               short_opt = t
+               summary = duration of fade period
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = seconds
+               default_val = 5
+[subcommand snooze]
+       purpose = fade out, pause, sleep, play, fade in
+       [option so-time]
+               summary = duration of fade-out period
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = seconds
+               default_val = 30
+       [option so-vol]
+               summary = destination volume for fade-out
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = volume
+               default_val = 20
+       [option snooze-time]
+               summary = delay between end of fade-out and begin of fade-in
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = seconds
+               default_val = 600
+       [option si-time]
+               summary = duration of fade-in period
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = seconds
+               default_val = 180
+       [option si-vol]
+               summary = destination volume for fade-in
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = volume
+               default_val = 80
+[subcommand sleep]
+       purpose = stream, fade out, sleep, fade in
+       [description]
+               Change to the initial volume and select the initial mood/playlist.
+               Fade out to the given fade-out volume in the specified time. Switch
+               to the sleep mood/playlist and wait until wake time minus fade-in
+               time. Finally, switch to the wake mood/playlist and fade in to the
+               fade-in volume.
+       [/description]
+       [option ivol]
+               summary = set initial volume
+               arg_info = required_arg
+               arg_type = string
+               default_val = 60
+               flag multiple
+               typestr = [channel:]volume
+               [help]
+                       Used as the start volume, before fading out to the fade-out volume. The
+                       channel part may be omitted, in which case the default channel is
+                       used. This option may be given multiple times.
+               [/help]
+       [option fo-mood]
+               summary = mood or playlist for fade-out
+               arg_info = required_arg
+               arg_type = string
+               typestr = mood_spec
+               default_val = m/fade
+               [help]
+                       This mood (or playlist) is selected right after setting the initial
+                       volume.
+               [/help]
+       [option fo-time]
+               summary = duration of fade-out period
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = seconds
+               default_val = 1800
+               [help]
+                       No fading if this is set to 0.
+               [/help]
+       [option fo-vol]
+               summary = destination volume for fade-out
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = volume
+               default_val = 20
+       [option sleep-mood]
+               summary = mood/playlist between fade-out and fade-in
+               arg_info = required_arg
+               arg_type = string
+               typestr = mood_spec
+               default_val = m/sleep
+               [help]
+                       Select the given mood or playlist after the fade-out. If unset,
+                       playback is stopped until fade-in starts.
+               [/help]
+       [option wake-hour]
+               short_opt = H
+               summary = A number between 0 and 23
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = hour
+               [help]
+                       If this is not given, the default is computed as now + 9 hours.
+               [/help]
+       [option wake-min]
+               short_opt = M
+               summary = A number between 0 and 59
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = minutes
+       [option fi-mood]
+               summary = mood or playlist for fade-in
+               arg_info = required_arg
+               arg_type = string
+               typestr = mood_spec
+               default_val = m/wake
+               [help]
+                       This mood or playlist is selected right before fade-in begins.
+               [/help]
+       [option fi-time]
+               summary = duration of fade-in period
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = seconds
+               default_val = 1200
+               [help]
+                       No fading if this is set to 0.
+               [/help]
+       [option fi-vol]
+               summary = destination volume for fade-in
+               arg_info = required_arg
+               arg_type = uint32
+               typestr = volume
+               default_val = 80