diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-10-08 14:19:47 +0800 |
---|---|---|
committer | Daniel Mack <daniel@caiaq.de> | 2009-10-08 14:19:47 +0800 |
commit | 0b388bff522f689fdb4d98529a39f3701db57c08 (patch) | |
tree | 837b4fb0993078a708dfddb5801220e44a711d32 /src/modules/module-position-event-sounds.c | |
parent | 94aa9097f4ded68623160d754a4bf2632b8efc79 (diff) | |
parent | 8ec304d2d1e956cc3f5f35437ac4fe580b36f004 (diff) |
Merge branch 'master' of git://0pointer.de/pulseaudio
Diffstat (limited to 'src/modules/module-position-event-sounds.c')
-rw-r--r-- | src/modules/module-position-event-sounds.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/modules/module-position-event-sounds.c b/src/modules/module-position-event-sounds.c index 7221b14f..ee4c8c88 100644 --- a/src/modules/module-position-event-sounds.c +++ b/src/modules/module-position-event-sounds.c @@ -74,7 +74,7 @@ static int parse_pos(const char *pos, double *f) { } static pa_hook_result_t sink_input_fixate_hook_callback(pa_core *core, pa_sink_input_new_data *data, struct userdata *u) { - const char *hpos, *vpos, *role; + const char *hpos, *vpos, *role, *id; double f; char t[PA_CVOLUME_SNPRINT_MAX]; pa_cvolume v; @@ -87,6 +87,22 @@ static pa_hook_result_t sink_input_fixate_hook_callback(pa_core *core, pa_sink_i if (!pa_streq(role, "event")) return PA_HOOK_OK; + if ((id = pa_proplist_gets(data->proplist, PA_PROP_EVENT_ID))) { + + /* The test sounds should never be positioned in space, since + * they might be trigered themselves to configure the speakers + * in space, which we don't want to mess up. */ + + if (pa_startswith(id, "audio-channel-")) + return PA_HOOK_OK; + + if (pa_streq(id, "audio-volume-change")) + return PA_HOOK_OK; + + if (pa_streq(id, "audio-test-signal")) + return PA_HOOK_OK; + } + if (!(hpos = pa_proplist_gets(data->proplist, PA_PROP_EVENT_MOUSE_HPOS))) hpos = pa_proplist_gets(data->proplist, PA_PROP_WINDOW_HPOS); |