summaryrefslogtreecommitdiff
path: root/src/xine-engine/audio_out.c
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2006-03-07 08:03:08 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2006-03-07 08:03:08 +0000
commit013d38071c3579a2006baf107b9f43cbef0bc569 (patch)
tree67a1d3e9b18985e995f82f6b2138f5937052a49e /src/xine-engine/audio_out.c
parentfffa38ba786165e6c4f3c449ec29e3bdc6be0820 (diff)
downloadxine-lib-013d38071c3579a2006baf107b9f43cbef0bc569.tar.gz
xine-lib-013d38071c3579a2006baf107b9f43cbef0bc569.tar.bz2
Fixed channels to mode translation in audio decoders.
Patch from Chris Brien. CVS patchset: 7922 CVS date: 2006/03/07 08:03:08
Diffstat (limited to 'src/xine-engine/audio_out.c')
-rw-r--r--src/xine-engine/audio_out.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index d04d045f8..e42f1cb90 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.197 2006/02/05 19:18:28 miguelfreitas Exp $
+ * $Id: audio_out.c,v 1.198 2006/03/07 08:03:22 tmattern Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -521,6 +521,24 @@ int _x_ao_mode2channels( int mode ) {
return 0;
}
+int _x_ao_channels2mode( int channels ) {
+
+ switch( channels ) {
+ case 1:
+ return AO_CAP_MODE_MONO;
+ case 2:
+ return AO_CAP_MODE_STEREO;
+ case 3:
+ case 4:
+ return AO_CAP_MODE_4CHANNEL;
+ case 5:
+ return AO_CAP_MODE_5CHANNEL;
+ case 6:
+ return AO_CAP_MODE_5_1CHANNEL;
+ }
+ return AO_CAP_NOCAP;
+}
+
static void audio_filter_compress (aos_t *this, int16_t *mem, int num_frames) {
int i, maxs;