* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: a52.c,v 1.10 2002/05/18 17:47:46 sam Exp $
+ * $Id: a52.c,v 1.11 2002/05/20 15:03:32 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/*****************************************************************************
* Build configuration structure.
*****************************************************************************/
+#define DYNRNG_TEXT N_("disable A/52 dynamic range compression")
+#define DYNRNG_LONGTEXT N_( \
+ "Dynamic range compression makes the loud sounds softer, and the soft " \
+ "sounds louder, so you can more easily listen to the stream in a noisy " \
+ "environment without disturbing anyone.\nIf you disable the dynamic range"\
+ " compression the playback will be more adapted to a movie theater or a " \
+ "listening room.")
+
MODULE_CONFIG_START
+ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
+ADD_BOOL ( "a52-no-dynrng", NULL, DYNRNG_TEXT, DYNRNG_LONGTEXT )
MODULE_CONFIG_STOP
MODULE_INIT_START
return -1;
}
+ p_a52_adec->b_dynrng = !config_GetIntVariable( "a52-no-dynrng" );
+
/* Init the BitStream */
InitBitstream( &p_a52_adec->bit_stream,
p_a52_adec->p_fifo,
a52_frame( p_a52_adec->p_a52_state, p_a52_adec->p_frame_buffer,
&p_a52_adec->flags, &sample_level, 384 );
+ if( !p_a52_adec->b_dynrng )
+ a52_dynrng( p_a52_adec->p_a52_state, NULL, NULL );
+
for( i = 0; i < 6; i++ )
{
if( a52_block( p_a52_adec->p_a52_state ) )
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: a52.h,v 1.2 2002/03/12 20:39:50 gbazin Exp $
+ * $Id: a52.h,v 1.3 2002/05/20 15:03:33 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
int flags;
int sample_rate;
int bit_rate;
+ boolean_t b_dynrng;
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t bit_stream;