summaryrefslogtreecommitdiff
path: root/src/libvorbis/xine_decoder.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/libvorbis/xine_decoder.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/libvorbis/xine_decoder.c')
-rw-r--r--src/libvorbis/xine_decoder.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/libvorbis/xine_decoder.c b/src/libvorbis/xine_decoder.c
index 4918af31a..3ba92eb45 100644
--- a/src/libvorbis/xine_decoder.c
+++ b/src/libvorbis/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.43 2005/01/27 11:17:28 holstsn Exp $
+ * $Id: xine_decoder.c,v 1.44 2006/03/07 08:03:10 tmattern Exp $
*
* (ogg/)vorbis audio decoder plugin (libvorbis wrapper) for xine
*/
@@ -166,28 +166,7 @@ static void vorbis_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
get_metadata (this);
-
- switch (this->vi.channels) {
- case 1:
- mode = AO_CAP_MODE_MONO;
- break;
- case 2:
- mode = AO_CAP_MODE_STEREO;
- break;
- case 4:
- mode = AO_CAP_MODE_4CHANNEL;
- break;
- case 5:
- mode = AO_CAP_MODE_5CHANNEL;
- break;
- case 6:
- mode = AO_CAP_MODE_5_1CHANNEL;
- break;
- default:
- printf ("libvorbis: help, %d channels ?!\n",
- this->vi.channels);
- /* FIXME: handle error */
- }
+ mode = _x_ao_channels2mode(this->vi.channels);
this->convsize=MAX_NUM_SAMPLES/this->vi.channels;