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

audio filters: remove old filter_NewAudioBuffer()

parent d09b6f75
......@@ -209,8 +209,6 @@ static inline void filter_DeleteSubpicture( filter_t *p_filter, subpicture_t *p_
p_filter->pf_sub_buffer_del( p_filter, p_subpicture );
}
#define filter_NewAudioBuffer(f,s) ((f), block_Alloc(s))
/**
* This function gives all input attachments at once.
*
......
......@@ -89,7 +89,7 @@ static bool FilterInit( filter_t *p_filter, block_t *p_block, block_t **pp_out )
p_filter->fmt_out.audio.i_bitspersample *
p_filter->fmt_out.audio.i_channels / 8;
block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
block_t *p_out = block_Alloc( i_out_size );
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
......
......@@ -164,7 +164,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
size_t i_nb_channels = aout_FormatNbChannels( &p_filter->fmt_out.audio );
size_t i_nb_rear = 0;
size_t i;
block_t *p_out_buf = filter_NewAudioBuffer( p_filter,
block_t *p_out_buf = block_Alloc(
sizeof(float) * i_nb_samples * i_nb_channels );
if( !p_out_buf )
goto out;
......
......@@ -510,7 +510,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
p_filter->fmt_out.audio.i_bitspersample/8 *
aout_FormatNbChannels( &(p_filter->fmt_out.audio) );
block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
block_t *p_out = block_Alloc( i_out_size );
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
......
......@@ -376,7 +376,7 @@ static block_t *Remap( filter_t *p_filter, block_t *p_block )
size_t i_out_size = p_block->i_nb_samples *
p_filter->fmt_out.audio.i_bytes_per_frame;
block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
block_t *p_out = block_Alloc( i_out_size );
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
......
......@@ -247,7 +247,7 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
p_filter->fmt_out.audio.i_bitspersample *
p_filter->fmt_out.audio.i_channels / 8;
block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
block_t *p_out = block_Alloc( i_out_size );
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
......
......@@ -109,7 +109,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
}
else
{
p_out_buf = filter_NewAudioBuffer( p_filter,
p_out_buf = block_Alloc(
p_in_buf->i_buffer / i_input_nb * i_output_nb );
if( !p_out_buf )
goto out;
......
......@@ -296,7 +296,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_in_buf )
int i_flags = p_sys->i_flags;
size_t i_bytes_per_block = 256 * p_sys->i_nb_channels * sizeof(sample_t);
block_t *p_out_buf = filter_NewAudioBuffer( p_filter, 6 * i_bytes_per_block );
block_t *p_out_buf = block_Alloc( 6 * i_bytes_per_block );
if( unlikely(p_out_buf == NULL) )
goto out;
......
......@@ -86,7 +86,7 @@ static block_t *DoWork( filter_t * p_filter, block_t *p_in_buf )
uint16_t i_frame_size = p_in_buf->i_buffer / 2;
uint8_t * p_in = p_in_buf->p_buffer;
block_t *p_out_buf = filter_NewAudioBuffer( p_filter, AOUT_SPDIF_SIZE );
block_t *p_out_buf = block_Alloc( AOUT_SPDIF_SIZE );
if( !p_out_buf )
goto out;
uint8_t * p_out = p_out_buf->p_buffer;
......
......@@ -156,8 +156,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
}
p_filter->p_sys->i_frames = 0;
block_t *p_out_buf = filter_NewAudioBuffer( p_filter,
12 * p_in_buf->i_nb_samples );
block_t *p_out_buf = block_Alloc( 12 * p_in_buf->i_nb_samples );
if( !p_out_buf )
goto out;
......
......@@ -145,7 +145,7 @@ static block_t *Resample( filter_t * p_filter, block_t * p_in_buf )
size_t i_out_size = i_bytes_per_frame * ( 1 + ( p_in_buf->i_nb_samples *
p_filter->fmt_out.audio.i_rate / p_filter->fmt_in.audio.i_rate) )
+ p_filter->p_sys->i_buf_size;
block_t *p_out_buf = filter_NewAudioBuffer( p_filter, i_out_size );
block_t *p_out_buf = block_Alloc( i_out_size );
if( !p_out_buf )
{
block_Release( p_in_buf );
......
......@@ -468,7 +468,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
}
size_t i_outsize = calculate_output_buffer_size ( p_filter, p_in_buf->i_buffer );
block_t *p_out_buf = filter_NewAudioBuffer( p_filter, i_outsize );
block_t *p_out_buf = block_Alloc( i_outsize );
if( p_out_buf == NULL )
return NULL;
......
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