diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-03-15 15:21:41 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-03-15 15:21:41 +0000 |
commit | d6bd152b4d5072f8af22644b7e2cdfa427a7fb86 (patch) | |
tree | 7f86a84e44d8e9d7772c8604740d396061fee331 /src/modules/module-match.c | |
parent | ebecf3d3e19ac56f507ce771d5c455198280a80c (diff) |
commit glitch-free work
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2124 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules/module-match.c')
-rw-r--r-- | src/modules/module-match.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/module-match.c b/src/modules/module-match.c index ed5f3076..0411dcdc 100644 --- a/src/modules/module-match.c +++ b/src/modules/module-match.c @@ -166,6 +166,7 @@ static void callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, v struct userdata *u = userdata; pa_sink_input *si; struct rule *r; + const char *n; pa_assert(c); pa_assert(u); @@ -176,13 +177,13 @@ static void callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, v if (!(si = pa_idxset_get_by_index(c->sink_inputs, idx))) return; - if (!si->name) + if (!(n = pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME))) return; for (r = u->rules; r; r = r->next) { - if (!regexec(&r->regex, si->name, 0, NULL, 0)) { + if (!regexec(&r->regex, n, 0, NULL, 0)) { pa_cvolume cv; - pa_log_debug("changing volume of sink input '%s' to 0x%03x", si->name, r->volume); + pa_log_debug("changing volume of sink input '%s' to 0x%03x", n, r->volume); pa_cvolume_set(&cv, si->sample_spec.channels, r->volume); pa_sink_input_set_volume(si, &cv); } |