summaryrefslogtreecommitdiffstats
path: root/polyp/module-x11-bell.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/module-x11-bell.c')
-rw-r--r--polyp/module-x11-bell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/polyp/module-x11-bell.c b/polyp/module-x11-bell.c
index 9b08c166..4fc4a60d 100644
--- a/polyp/module-x11-bell.c
+++ b/polyp/module-x11-bell.c
@@ -66,6 +66,7 @@ static const char* const valid_modargs[] = {
static int ring_bell(struct userdata *u, int percent) {
pa_sink *s;
+ pa_cvolume cv;
assert(u);
if (!(s = pa_namereg_get(u->core, u->sink_name, PA_NAMEREG_SINK, 1))) {
@@ -73,7 +74,7 @@ static int ring_bell(struct userdata *u, int percent) {
return -1;
}
- pa_scache_play_item(u->core, u->scache_item, s, percent*2);
+ pa_scache_play_item(u->core, u->scache_item, s, pa_cvolume_set(&cv, PA_CHANNELS_MAX, percent*PA_VOLUME_NORM/100));
return 0;
}