Commit 6400a004 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout_Filters*Pipeline: remove useless parameter, constify

parent 04058ca6
......@@ -104,8 +104,8 @@ bool aout_InputIsEmpty( aout_instance_t * p_aout, aout_input_t * p_input );
/* From filters.c : */
int aout_FiltersCreatePipeline ( aout_instance_t * p_aout, filter_t ** pp_filters, int * pi_nb_filters, const audio_sample_format_t * p_input_format, const audio_sample_format_t * p_output_format );
void aout_FiltersDestroyPipeline ( aout_instance_t * p_aout, filter_t ** pp_filters, int i_nb_filters );
void aout_FiltersPlay ( filter_t ** pp_filters, unsigned i_nb_filters, aout_buffer_t ** pp_input_buffer );
void aout_FiltersDestroyPipeline( filter_t *const *, unsigned );
void aout_FiltersPlay( filter_t *const *, unsigned, aout_buffer_t ** );
/* From mixer.c : */
int aout_MixerNew( aout_instance_t * p_aout );
......
......@@ -273,19 +273,14 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
return 0;
}
/*****************************************************************************
* aout_FiltersDestroyPipeline: deallocate a filters pipeline
*****************************************************************************/
void aout_FiltersDestroyPipeline( aout_instance_t * p_aout,
filter_t ** pp_filters,
int i_nb_filters )
/**
* Destroys a chain of audio filters.
*/
void aout_FiltersDestroyPipeline( filter_t *const *filters, unsigned n )
{
int i;
(void)p_aout;
for ( i = 0; i < i_nb_filters; i++ )
for( unsigned i = 0; i < n; i++ )
{
filter_t *p_filter = pp_filters[i];
filter_t *p_filter = filters[i];
module_unneed( p_filter, p_filter->p_module );
free( p_filter->p_owner );
......@@ -293,10 +288,10 @@ void aout_FiltersDestroyPipeline( aout_instance_t * p_aout,
}
}
/*****************************************************************************
* aout_FiltersPlay: play a buffer
*****************************************************************************/
void aout_FiltersPlay( filter_t ** pp_filters,
/**
* Filters an audio buffer through a chain of filters.
*/
void aout_FiltersPlay( filter_t *const *pp_filters,
unsigned i_nb_filters, block_t ** pp_block )
{
block_t *p_block = *pp_block;
......@@ -312,4 +307,3 @@ void aout_FiltersPlay( filter_t ** pp_filters,
}
*pp_block = p_block;
}
......@@ -451,10 +451,9 @@ int aout_InputDelete( aout_instance_t * p_aout, aout_input_t * p_input )
p_input->b_recycle_vout = psz_visual && *psz_visual;
free( psz_visual );
aout_FiltersDestroyPipeline( p_aout, p_input->pp_filters,
p_input->i_nb_filters );
aout_FiltersDestroyPipeline( p_input->pp_filters, p_input->i_nb_filters );
p_input->i_nb_filters = 0;
aout_FiltersDestroyPipeline( p_aout, p_input->pp_resamplers,
aout_FiltersDestroyPipeline( p_input->pp_resamplers,
p_input->i_nb_resamplers );
p_input->i_nb_resamplers = 0;
aout_FifoDestroy( p_aout, &p_input->mixer.fifo );
......@@ -753,9 +752,8 @@ static void inputFailure( aout_instance_t * p_aout, aout_input_t * p_input,
msg_Err( p_aout, "%s", psz_error_message );
/* clean up */
aout_FiltersDestroyPipeline( p_aout, p_input->pp_filters,
p_input->i_nb_filters );
aout_FiltersDestroyPipeline( p_aout, p_input->pp_resamplers,
aout_FiltersDestroyPipeline( p_input->pp_filters, p_input->i_nb_filters );
aout_FiltersDestroyPipeline( p_input->pp_resamplers,
p_input->i_nb_resamplers );
aout_FifoDestroy( p_aout, &p_input->mixer.fifo );
var_Destroy( p_aout, "visual" );
......
......@@ -211,7 +211,7 @@ void aout_OutputDelete( aout_instance_t * p_aout )
module_unneed( p_aout, p_aout->output.p_module );
p_aout->output.p_module = NULL;
aout_FiltersDestroyPipeline( p_aout, p_aout->output.pp_filters,
aout_FiltersDestroyPipeline( p_aout->output.pp_filters,
p_aout->output.i_nb_filters );
aout_lock_output_fifo( p_aout );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment