summaryrefslogtreecommitdiffstats
path: root/polyp/module-match.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-01-27 16:25:31 +0000
committerLennart Poettering <lennart@poettering.net>2006-01-27 16:25:31 +0000
commitdd10c982414dfa8fbb9aeeeae61c68e4a6f081cc (patch)
tree8c05e4a7344570c2f4d40854baddeff7cc353709 /polyp/module-match.c
parent759721cbbc265cc6ce4c5dd9141e00ca67c8fe2d (diff)
Mega patch:
* implement inner loops using liboil * drop "typeid" stuff * add support for channel maps * add support for seperate volumes per channel * add support for hardware mixer settings (only module-oss implements this for now) * fix a lot of types for _t suffix git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@463 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/module-match.c')
-rw-r--r--polyp/module-match.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/polyp/module-match.c b/polyp/module-match.c
index e48d55ca..e3e7b17d 100644
--- a/polyp/module-match.c
+++ b/polyp/module-match.c
@@ -154,7 +154,7 @@ finish:
return ret;
}
-static void callback(pa_core *c, pa_subscription_event_type t, uint32_t idx, void *userdata) {
+static void callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
struct userdata *u = userdata;
pa_sink_input *si;
struct rule *r;
@@ -171,8 +171,10 @@ static void callback(pa_core *c, pa_subscription_event_type t, uint32_t idx, voi
for (r = u->rules; r; r = r->next) {
if (!regexec(&r->regex, si->name, 0, NULL, 0)) {
+ pa_cvolume cv;
pa_log_debug(__FILE__": changing volume of sink input '%s' to 0x%03x\n", si->name, r->volume);
- pa_sink_input_set_volume(si, r->volume);
+ pa_cvolume_set(&cv, r->volume, si->sample_spec.channels);
+ pa_sink_input_set_volume(si, &cv);
}
}
}