aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_audiotrack.c
diff options
context:
space:
mode:
authorPaul ADENOT <[email protected]>2013-05-31 11:46:48 +0200
committerPaul ADENOT <[email protected]>2013-05-31 11:46:48 +0200
commit9c5d094031c142667461b96f59a3b15e76975de4 (patch)
treea5e124a623cccc0733f8a76cb625521801d50b6e /src/cubeb_audiotrack.c
parentd2576fdb49422d09b8ed667b76dd637c841448e5 (diff)
downloadcubeb-9c5d094031c142667461b96f59a3b15e76975de4.tar.gz
cubeb-9c5d094031c142667461b96f59a3b15e76975de4.zip
Mozilla bug 865244 - Add cubeb_stream_get_max_channels.
This function returns the maximum number of channel available on the current hardware/platform.
Diffstat (limited to 'src/cubeb_audiotrack.c')
-rw-r--r--src/cubeb_audiotrack.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cubeb_audiotrack.c b/src/cubeb_audiotrack.c
index 2c4577c..a44c16a 100644
--- a/src/cubeb_audiotrack.c
+++ b/src/cubeb_audiotrack.c
@@ -276,6 +276,18 @@ audiotrack_get_backend_id(cubeb * context)
return "audiotrack";
}
+static int
+audiotrack_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
+{
+ assert(ctx && max_channels);
+
+ /* The android mixer handles up to two channels, see
+ http://androidxref.com/4.2.2_r1/xref/frameworks/av/services/audioflinger/AudioFlinger.h#67 */
+ *max_channels = 2;
+
+ return CUBEB_OK;
+}
+
void
audiotrack_destroy(cubeb * context)
{