[Xfce4-commits] [apps/xfce4-volumed-pulse] 43/62: Reinstate use of the vol-step xfconf property
noreply at xfce.org
noreply at xfce.org
Thu Sep 8 10:33:05 CEST 2016
This is an automated email from the git hooks/post-receive script.
ochosi pushed a commit to branch master
in repository apps/xfce4-volumed-pulse.
commit 282d9bb498f9ca22db2c79a0372cdcace9dc1f2d
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date: Thu May 24 23:15:26 2012 +0200
Reinstate use of the vol-step xfconf property
---
TODO | 1 -
src/xvd_pulse.c | 10 ++++++++--
src/xvd_pulse.h | 3 ---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/TODO b/TODO
index cdb0492..3704e52 100644
--- a/TODO
+++ b/TODO
@@ -1,2 +1 @@
* rename to xfce4-volumed-pulse, so that both can coexist (but not run at the same time, obviously)
-* reinstate /step prop read from xfconf
diff --git a/src/xvd_pulse.c b/src/xvd_pulse.c
index 12d533d..e0b575d 100644
--- a/src/xvd_pulse.c
+++ b/src/xvd_pulse.c
@@ -29,6 +29,12 @@
#include "xvd_pulse.h"
+/**
+ * Translates a "human" volume step (0-100) for PulseAudio.
+ */
+#define XVD_PA_VOLUME_STEP(n) ((pa_volume_t)((n) * PA_VOLUME_NORM / 100))
+
+
static pa_cvolume old_volume;
static int old_mute;
@@ -123,12 +129,12 @@ xvd_update_volume (XvdInstance *i,
{
case XVD_UP:
pa_cvolume_inc_clamp (&i->volume,
- PA_VOL_STEP_DEFAULT,
+ XVD_PA_VOLUME_STEP(i->vol_step),
PA_VOLUME_NORM);
break;
case XVD_DOWN:
pa_cvolume_dec (&i->volume,
- PA_VOL_STEP_DEFAULT);
+ XVD_PA_VOLUME_STEP(i->vol_step));
break;
default:
g_warning ("xvd_update_volume: invalid direction");
diff --git a/src/xvd_pulse.h b/src/xvd_pulse.h
index 8df3a06..4f06e8c 100644
--- a/src/xvd_pulse.h
+++ b/src/xvd_pulse.h
@@ -25,9 +25,6 @@
#include "xvd_data_types.h"
-#define PA_VOL_STEP_DEFAULT ((pa_volume_t)((VOL_STEP_DEFAULT_VAL * PA_VOLUME_NORM) / 100))
-
-
/**
* Entry point, required to use the pulseaudio server.
*/
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list