# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_es.h>
#include <vlc_block.h>
#include <vlc_filter.h>
struct filter_sys_t
{
- vlc_bool_t b_downmix;
+ bool b_downmix;
unsigned int i_nb_channels; /* number of int16_t per sample */
int i_channel_selected;
int i_bitspersample;
size_t i_overflow_buffer_size;/* in bytes */
- byte_t * p_overflow_buffer;
+ uint8_t * p_overflow_buffer;
unsigned int i_nb_atomic_operations;
struct atomic_operation_t * p_atomic_operations;
};
"2=rear left, 3=rear right, 4=center, 5=left front)")
static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5 };
-static const char *ppsz_pos_descriptions[] =
+static const char *const ppsz_pos_descriptions[] =
{ N_("Left"), N_("Right"), N_("Left rear"), N_("Right rear"), N_("Center"),
N_("Left front") };
* Module descriptor
*****************************************************************************/
vlc_module_begin();
- set_description( _("Audio filter for stereo to mono conversion") );
+ set_description( N_("Audio filter for stereo to mono conversion") );
set_capability( "audio filter2", 0 );
- add_bool( MONO_CFG "downmix", VLC_FALSE, NULL, MONO_DOWNMIX_TEXT,
- MONO_DOWNMIX_LONGTEXT, VLC_FALSE );
+ add_bool( MONO_CFG "downmix", false, NULL, MONO_DOWNMIX_TEXT,
+ MONO_DOWNMIX_LONGTEXT, false );
add_integer( MONO_CFG "channel", -1, NULL, MONO_CHANNEL_TEXT,
- MONO_CHANNEL_LONGTEXT, VLC_FALSE );
+ MONO_CHANNEL_LONGTEXT, false );
change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
set_category( CAT_AUDIO );
p_data->p_atomic_operations = malloc( sizeof(struct atomic_operation_t)
* p_data->i_nb_atomic_operations );
if( p_data->p_atomic_operations == NULL )
- {
- msg_Err( p_this, "out of memory" );
return -1;
- }
/* For each virtual speaker, computes elementary wave propagation time
* to each ear */
}
p_data->p_overflow_buffer = malloc( p_data->i_overflow_buffer_size );
if( p_data->p_atomic_operations == NULL )
- {
- msg_Err( p_this, "out of memory" );
return -1;
- }
memset( p_data->p_overflow_buffer, 0, p_data->i_overflow_buffer_size );
/* end */
/* Allocate the memory needed to store the module's structure */
p_sys = p_filter->p_sys = malloc( sizeof(filter_sys_t) );
if( p_sys == NULL )
- {
- msg_Err( p_filter, "out of memory" );
return VLC_EGENERIC;
- }
var_Create( p_this, MONO_CFG "downmix",
VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
int i_output_nb = aout_FormatNbChannels( &p_filter->output );
int16_t * p_in = (int16_t*) p_in_buf->p_buffer;
- byte_t * p_out;
- byte_t * p_overflow;
- byte_t * p_slide;
+ uint8_t * p_out;
+ uint8_t * p_overflow;
+ uint8_t * p_slide;
size_t i_overflow_size; /* in bytes */
size_t i_out_size; /* in bytes */