From 6c8e0f1d2fb74bd798dd787ca89711c5d5dbf570 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Mon, 26 Jan 2004 20:13:58 +0000 Subject: Support for 5.1 channel AAC, including downmixing to 2 channels when required CVS patchset: 6068 CVS date: 2004/01/26 20:13:58 --- src/libfaad/xine_decoder.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/libfaad/xine_decoder.c b/src/libfaad/xine_decoder.c index 77efd83f1..e12a43488 100644 --- a/src/libfaad/xine_decoder.c +++ b/src/libfaad/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.28 2004/01/12 17:35:16 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.29 2004/01/26 20:13:58 jstembridge Exp $ * */ @@ -282,6 +282,17 @@ this->num_channels = 2; case 1: this->ao_cap_mode=AO_CAP_MODE_MONO; break; + case 6: + if(this->stream->audio_out->get_capabilities(this->stream->audio_out) & + AO_CAP_MODE_5_1CHANNEL) { + this->ao_cap_mode = AO_CAP_MODE_5_1CHANNEL; + break; + } else { + this->faac_cfg = faacDecGetCurrentConfiguration(this->faac_dec); + this->faac_cfg->downMatrix = 1; + faacDecSetConfiguration(this->faac_dec, this->faac_cfg); + this->num_channels = 2; + } case 2: this->ao_cap_mode=AO_CAP_MODE_STEREO; break; -- cgit v1.2.3