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

Remove write-only aout_alloc.i_bytes_per_sec

parent 01e4e9dc
......@@ -138,7 +138,6 @@ typedef int32_t vlc_fixed_t;
typedef struct aout_alloc_t
{
bool b_alloc;
int i_bytes_per_sec;
} aout_alloc_t;
/** audio output buffer FIFO */
......
......@@ -106,7 +106,6 @@ bool aout_InputIsEmpty( aout_instance_t * p_aout, aout_input_t * p_input );
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_FiltersHintBuffers( aout_instance_t * p_aout, filter_t ** pp_filters, int i_nb_filters, aout_alloc_t * p_first_alloc );
/* From mixer.c : */
int aout_MixerNew( aout_instance_t * p_aout );
......
......@@ -293,36 +293,6 @@ void aout_FiltersDestroyPipeline( aout_instance_t * p_aout,
}
}
/*****************************************************************************
* aout_FiltersHintBuffers: fill in aout_alloc_t structures to optimize
* buffer allocations
*****************************************************************************/
void aout_FiltersHintBuffers( aout_instance_t * p_aout,
filter_t ** pp_filters,
int i_nb_filters, aout_alloc_t * p_first_alloc )
{
int i;
(void)p_aout; /* unused */
for ( i = i_nb_filters - 1; i >= 0; i-- )
{
filter_t * p_filter = pp_filters[i];
int i_output_size = p_filter->fmt_out.audio.i_bytes_per_frame
* p_filter->fmt_out.audio.i_rate * AOUT_MAX_INPUT_RATE
/ p_filter->fmt_out.audio.i_frame_length;
int i_input_size = p_filter->fmt_in.audio.i_bytes_per_frame
* p_filter->fmt_in.audio.i_rate * AOUT_MAX_INPUT_RATE
/ p_filter->fmt_in.audio.i_frame_length;
if( i_output_size > p_first_alloc->i_bytes_per_sec )
p_first_alloc->i_bytes_per_sec = i_output_size;
if( i_input_size > p_first_alloc->i_bytes_per_sec )
p_first_alloc->i_bytes_per_sec = i_input_size;
}
}
/*****************************************************************************
* aout_FiltersPlay: play a buffer
*****************************************************************************/
......
......@@ -199,14 +199,6 @@ int aout_OutputNew( aout_instance_t * p_aout,
/* Prepare hints for the buffer allocator. */
p_aout->mixer_allocation.b_alloc = true;
p_aout->mixer_allocation.i_bytes_per_sec
= p_aout->mixer_format.i_bytes_per_frame
* p_aout->mixer_format.i_rate
/ p_aout->mixer_format.i_frame_length;
aout_FiltersHintBuffers( p_aout, p_aout->output.pp_filters,
p_aout->output.i_nb_filters,
&p_aout->mixer_allocation );
return 0;
}
......
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