* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: a52tofloat32.c,v 1.11 2003/01/22 09:54:28 massiot Exp $
+ * $Id: a52tofloat32.c,v 1.13 2003/02/20 01:52:45 sigmunau Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
"listening room.")
vlc_module_begin();
- add_category_hint( N_("Miscellaneous"), NULL );
- add_bool( "a52-dynrng", 1, NULL, DYNRNG_TEXT, DYNRNG_LONGTEXT );
+ add_category_hint( N_("Miscellaneous"), NULL, VLC_FALSE );
+ add_bool( "a52-dynrng", 1, NULL, DYNRNG_TEXT, DYNRNG_LONGTEXT, VLC_FALSE );
set_description( _("ATSC A/52 aka AC-3 audio decoder module") );
set_capability( "audio filter", 100 );
set_callbacks( Create, Destroy );
}
}
+/*****************************************************************************
+ * Exchange: helper function to exchange left & right channels
+ *****************************************************************************/
+static void Exchange( float * p_out, const float * p_in )
+{
+ int i;
+ const float * p_first = p_in + 256;
+ const float * p_second = p_in;
+
+ for ( i = 0; i < 256; i++ )
+ {
+ *p_out++ = *p_first++;
+ *p_out++ = *p_second++;
+ }
+}
+
/*****************************************************************************
* DoWork: decode an ATSC A/52 frame.
*****************************************************************************/
Duplicate( (float *)(p_out_buf->p_buffer + i * i_bytes_per_block),
p_samples );
}
+ else if ( p_filter->output.i_original_channels
+ & AOUT_CHAN_REVERSESTEREO )
+ {
+ Exchange( (float *)(p_out_buf->p_buffer + i * i_bytes_per_block),
+ p_samples );
+ }
else
{
/* Interleave the *$£%ù samples. */