From c2f5faef97643ef21ff86308c062165e19bad2c2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 26 May 2009 20:43:02 +0200 Subject: multichannel: introduce a proper name for the CA_PROP_CANBERRA_FORCE_CHANNEL property --- src/canberra.h.in | 17 +++++++++++++++++ src/pulse.c | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/canberra.h.in b/src/canberra.h.in index 857c0cb..5bf76b2 100644 --- a/src/canberra.h.in +++ b/src/canberra.h.in @@ -390,6 +390,23 @@ extern "C" { */ #define CA_PROP_CANBERRA_ENABLE "canberra.enable" +/** + * CA_PROP_CANBERRA_FORCE_CHANNEL: + * + * A special property that can be used to control on which channel a + * sound is played. The value should be one of mono, front-left, + * front-right, front-center, rear-left, rear-right, rear-center, lfe, + * front-left-of-center, front-right-of-center, side-left, side-right, + * top-center, top-front-left, top-front-right, top-front-center, + * top-rear-left, top-rear-right, top-rear-center. This property is + * only honoured by some backends, other backends may choose to ignore + * it completely. + * + * If the list of properties is handed on to the sound server this + * property is stripped from it. + */ +#define CA_PROP_CANBERRA_FORCE_CHANNEL "canberra.force_channel" + /** * ca_context: * diff --git a/src/pulse.c b/src/pulse.c index 8351993..1dc542e 100644 --- a/src/pulse.c +++ b/src/pulse.c @@ -801,7 +801,7 @@ int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_cal goto finish; } - if ((channel = pa_proplist_gets(l, "canberra.force_channel"))) { + if ((channel = pa_proplist_gets(l, CA_PROP_CANBERRA_FORCE_CHANNEL))) { pa_channel_map t; if (!pa_channel_map_parse(&t, channel) || @@ -1119,7 +1119,7 @@ int driver_cache(ca_context *c, ca_proplist *proplist) { goto finish; } - if ((ct = pa_proplist_gets(l, "canberra.force_channel"))) { + if ((ct = pa_proplist_gets(l, CA_PROP_CANBERRA_FORCE_CHANNEL))) { ret = CA_ERROR_NOTSUPPORTED; goto finish; } -- cgit