summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-05-26 20:43:02 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-26 20:43:02 +0200
commitc2f5faef97643ef21ff86308c062165e19bad2c2 (patch)
treec93a00dd1aaa42c63073f2bcae4252a7aba6c291
parent4695c1136d2663a67aa5ea564fd308489ce8ee9d (diff)
multichannel: introduce a proper name for the CA_PROP_CANBERRA_FORCE_CHANNEL property
-rw-r--r--src/canberra.h.in17
-rw-r--r--src/pulse.c4
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;
}