[Pommed-commits] r387 - in trunk: . pommed

jblache at alioth.debian.org jblache at alioth.debian.org
Sun Nov 25 13:27:02 UTC 2007


Author: jblache
Date: 2007-11-25 13:27:01 +0000 (Sun, 25 Nov 2007)
New Revision: 387

Modified:
   trunk/ChangeLog
   trunk/pommed.conf.mactel
   trunk/pommed.conf.pmac
   trunk/pommed/audio.c
   trunk/pommed/conffile.c
   trunk/pommed/conffile.h
Log:
Add an option to disable the beep on volume change.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-11-19 14:51:09 UTC (rev 386)
+++ trunk/ChangeLog	2007-11-25 13:27:01 UTC (rev 387)
@@ -2,6 +2,7 @@
 --------------------
 
 version 1.13:
+	- pommed: add an option to disable the beep on volume change.
 
 version 1.12:
 	- pommed: do not expect at least 3 evdevs at startup; there are

Modified: trunk/pommed/audio.c
===================================================================
--- trunk/pommed/audio.c	2007-11-19 14:51:09 UTC (rev 386)
+++ trunk/pommed/audio.c	2007-11-25 13:27:01 UTC (rev 387)
@@ -93,7 +93,8 @@
   if (snd_mixer_selem_is_playback_mono(vol_elem) == 0)
     snd_mixer_selem_set_playback_volume(vol_elem, 1, newvol);
 
-  beep_audio();
+  if (audio_cfg.beep)
+    beep_audio();
 
   mbpdbus_send_audio_volume(newvol, vol);
 

Modified: trunk/pommed/conffile.c
===================================================================
--- trunk/pommed/conffile.c	2007-11-19 14:51:09 UTC (rev 386)
+++ trunk/pommed/conffile.c	2007-11-25 13:27:01 UTC (rev 387)
@@ -102,6 +102,7 @@
     CFG_STR("card", "default", CFGF_NONE),
     CFG_INT("init", -1, CFGF_NONE),
     CFG_INT("step", 10, CFGF_NONE),
+    CFG_BOOL("beep", 1, CFGF_NONE),
     CFG_STR("volume", "PCM", CFGF_NONE),
     CFG_STR("speakers", "Front", CFGF_NONE),
     CFG_STR("headphones", "Headphone", CFGF_NONE),
@@ -220,6 +221,7 @@
   printf("    card: %s\n", audio_cfg.card);
   printf("    initial volume: %d%s\n", audio_cfg.init, (audio_cfg.init > -1) ? "%" : "");
   printf("    step: %d%%\n", audio_cfg.step);
+  printf("    beep: %s\n", (audio_cfg.beep) ? "yes" : "no");
   printf("    volume element: %s\n", audio_cfg.vol);
   printf("    speaker element: %s\n", audio_cfg.spkr);
   printf("    headphones element: %s\n", audio_cfg.head);
@@ -351,6 +353,7 @@
   audio_cfg.card = strdup(cfg_getstr(sec, "card"));
   audio_cfg.init = cfg_getint(sec, "init");
   audio_cfg.step = cfg_getint(sec, "step");
+  audio_cfg.beep = cfg_getbool(sec, "beep");
   audio_cfg.vol = strdup(cfg_getstr(sec, "volume"));
   audio_cfg.spkr = strdup(cfg_getstr(sec, "speakers"));
   audio_cfg.head = strdup(cfg_getstr(sec, "headphones"));

Modified: trunk/pommed/conffile.h
===================================================================
--- trunk/pommed/conffile.h	2007-11-19 14:51:09 UTC (rev 386)
+++ trunk/pommed/conffile.h	2007-11-25 13:27:01 UTC (rev 387)
@@ -42,6 +42,7 @@
   char *card;
   int init;
   int step;
+  int beep;
   char *vol;
   char *spkr;
   char *head;

Modified: trunk/pommed.conf.mactel
===================================================================
--- trunk/pommed.conf.mactel	2007-11-19 14:51:09 UTC (rev 386)
+++ trunk/pommed.conf.mactel	2007-11-25 13:27:01 UTC (rev 387)
@@ -50,6 +50,8 @@
 	init = -1
 	# step value (1 - 50%)
 	step = 10
+	# beep on volume change
+	beep = yes
 	# mixer element for volume adjustment
 	volume = "PCM"
 	# mixer element for muting the speakers

Modified: trunk/pommed.conf.pmac
===================================================================
--- trunk/pommed.conf.pmac	2007-11-19 14:51:09 UTC (rev 386)
+++ trunk/pommed.conf.pmac	2007-11-25 13:27:01 UTC (rev 387)
@@ -40,6 +40,8 @@
 	init = -1
 	# step value (1 - 50%)
 	step = 10
+	# beep on volume change
+	beep = yes
 	# mixer element for volume adjustment
 	volume = "Master"
 	# mixer element for muting the speakers




More information about the Pommed-commits mailing list