* decoder.c: AAC decoder using libfaad2
*****************************************************************************
* Copyright (C) 2001, 2003 VideoLAN
- * $Id: faad.c,v 1.8 2003/12/12 23:15:40 gbazin Exp $
+ * $Id: faad.c,v 1.11 2004/02/19 15:42:25 jpsaman Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
/* Open a faad context */
if( ( p_sys->hfaad = faacDecOpen() ) == NULL )
{
- msg_Err( p_dec, "Cannot initialize faad" );
+ msg_Err( p_dec, "cannot initialize faad" );
return VLC_EGENERIC;
}
/* Misc init */
aout_DateSet( &p_sys->date, 0 );
p_dec->fmt_out.i_cat = AUDIO_ES;
- p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+
+ if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
+ p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+ else
+ p_dec->fmt_out.i_codec = VLC_FOURCC('f','i','1','6');
p_dec->pf_decode_audio = DecodeBlock;
p_dec->fmt_out.audio.i_physical_channels =
/* Set the faad config */
cfg = faacDecGetCurrentConfiguration( p_sys->hfaad );
- cfg->outputFormat = FAAD_FMT_FLOAT;
+ if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
+ cfg->outputFormat = FAAD_FMT_FLOAT;
+ else
+ cfg->outputFormat = FAAD_FMT_16BIT;
faacDecSetConfiguration( p_sys->hfaad, cfg );
/* buffer */
if( frame.samples <= 0 )
{
- msg_Warn( p_dec, "decoded zero samples" );
+ msg_Warn( p_dec, "decoded zero sample" );
/* Flush the buffer */
p_sys->i_buffer -= frame.bytesconsumed;