X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fgengetopt%2Ffade.m4;h=59389ffefb5105ee8af56e4d7b844377c9d5d9c7;hb=837cd1ab890645d9fd7d0d85139fdf076d987ea4;hp=ff4b451b34cb027e0e0375f778678c38e90abeee;hpb=35e284e06a5c8e20d02b61fdcb4bcc20b237c1e4;p=paraslash.git
diff --git a/m4/gengetopt/fade.m4 b/m4/gengetopt/fade.m4
index ff4b451b..59389ffe 100644
--- a/m4/gengetopt/fade.m4
+++ b/m4/gengetopt/fade.m4
@@ -1,17 +1,27 @@
-args "--conf-parser --no-handle-version"
+args "--conf-parser --no-handle-version --no-handle-help"
+purpose "An alarm clock and volume-fader for OSS and ALSA"
+
+include(header.m4)
+define(CURRENT_PROGRAM,para_fade)
+define(DEFAULT_CONFIG_FILE,~/.paraslash/fade.conf)
+
section "General options"
#########################
+
+include(config_file.m4)
+include(loglevel.m4)
+
option "mode" o
#~~~~~~~~~~~~~~
"how to fade volume"
enum typestr = "mode"
- values = "sleep", "snooze", "fade"
+ values = "sleep", "fade", "set", "snooze"
default = "sleep"
optional
details="
- para_fade knows three different fading modes:
+ para_fade knows the following modes:
sleep mode: Change to the initial volume and select
the initial afs mood/playlist. Then fade out until
@@ -23,34 +33,54 @@ option "mode" o
fade: Fade the volume to the given value in the
given time.
+ set: Just set the value and exit.
+
snooze: Fade out, sleep a bit and fade in.
"
-option "config-file" c
-#~~~~~~~~~~~~~~~~~~~~~
-"(default='~/.paraslash/fade.conf')"
- string typestr = "filename"
+option "mixer-api" a
+#~~~~~~~~~~~~~~~~~~~
+"choose the mixer API"
+ string typestr = "api"
optional
+ details = "
+ 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.
+ "
option "mixer-device" m
#~~~~~~~~~~~~~~~~~~~~~~
-"mixer device file"
+"choose mixer device"
string typestr = "device"
- default = "/dev/mixer"
optional
+ details = "
+ 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.
+ "
option "mixer-channel" C
#~~~~~~~~~~~~~~~~~~~~~~~
"select the analog mixer channel"
- enum typestr = "channel"
- values = "volume", "bass", "treble", "synth", "pcm", "speaker", "line",
- "mic", "cd", "imix", "altpcm", "reclev", "igain", "ogain"
- default = "volume"
+ string typestr = "channel"
optional
details = "
- Not all listed channels might be supported on any
- particular hardware.
-"
+ 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'.
+ "
section "Options for sleep mode"
################################
@@ -58,12 +88,15 @@ section "Options for sleep mode"
option "ivol" -
#~~~~~~~~~~~~~~
"set initial volume"
- int typestr = "volume"
+ string typestr = "[channel:]volume"
default = "60"
optional
+ multiple
details = "
Used as the start volume, before fading out to the
- fade out volume.
+ fade out volume. The channel part may be omitted, in
+ which case the default channel is used. This option
+ may be given multiple times.
"
option "fo-mood" -
@@ -200,3 +233,14 @@ option "fade-time" t
int typestr = "seconds"
default = "5"
optional
+
+section "Options for set mode"
+##############################
+
+option "val" -
+"value to set"
+ int typestr = "value"
+ default = "0"
+ optional
+
+