diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/canberra.h.in | 17 | ||||
-rw-r--r-- | 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 @@ -391,6 +391,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: * * A libcanberra context object. 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; } |