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

i_nb_bytes -> i_buffer

(Yeah, some automatic variables were renamed too)
parent 38c08789
......@@ -131,7 +131,7 @@ struct aout_buffer_t
uint8_t * p_buffer;
/* i_size is the real size of the buffer (used for debug ONLY), i_nb_bytes
* is the number of significative bytes in it. */
size_t i_size, i_nb_bytes;
size_t i_size, i_buffer;
unsigned int i_nb_samples;
uint32_t i_flags;
mtime_t i_pts, i_length;
......
......@@ -176,9 +176,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
size_t i;
p_out_buf->i_nb_samples = i_nb_samples;
p_out_buf->i_nb_bytes = sizeof(float) * i_nb_samples
p_out_buf->i_buffer = sizeof(float) * i_nb_samples
* aout_FormatNbChannels( &p_filter->output );
memset( p_out, 0, p_out_buf->i_nb_bytes );
memset( p_out, 0, p_out_buf->i_buffer );
if( p_sys->i_rear_left >= 0 )
......
......@@ -466,9 +466,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* out buffer characterisitcs */
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb;
p_out_buf->i_buffer = p_in_buf->i_buffer * i_output_nb / i_input_nb;
p_out = p_out_buf->p_buffer;
i_out_size = p_out_buf->i_nb_bytes;
i_out_size = p_out_buf->i_buffer;
/* Slide the overflow buffer */
p_overflow = p_sys->p_overflow_buffer;
......@@ -675,15 +675,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter.b_in_place = 0;
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_buffer = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer;
out_buf.i_nb_bytes = p_out->i_buffer;
out_buf.i_buffer = p_out->i_buffer;
out_buf.i_nb_samples = p_out->i_nb_samples;
DoWork( (aout_instance_t *)p_filter, &aout_filter, &in_buf, &out_buf );
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_buffer = out_buf.i_buffer;
p_out->i_nb_samples = out_buf.i_nb_samples;
block_Release( p_block );
......
......@@ -490,13 +490,13 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter.output.i_format = p_filter->fmt_out.i_codec;
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_buffer = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples;
#if 0
unsigned int i_in_size = in_buf.i_nb_samples * (p_filter->p_sys->i_bitspersample/8) *
aout_FormatNbChannels( &(p_filter->fmt_in.audio) );
if( (in_buf.i_nb_bytes != i_in_size) && ((i_in_size % 32) != 0) ) /* is it word aligned?? */
if( (in_buf.i_buffer != i_in_size) && ((i_in_size % 32) != 0) ) /* is it word aligned?? */
{
msg_Err( p_filter, "input buffer is not word aligned" );
/* Fix output buffer to be word aligned */
......@@ -504,7 +504,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
#endif
out_buf.p_buffer = p_out->p_buffer;
out_buf.i_nb_bytes = p_out->i_buffer;
out_buf.i_buffer = p_out->i_buffer;
out_buf.i_nb_samples = p_out->i_nb_samples;
memset( p_out->p_buffer, 0, i_out_size );
......@@ -518,7 +518,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
i_samples = stereo_to_mono( &aout_filter, &out_buf, &in_buf );
}
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_buffer = out_buf.i_buffer;
p_out->i_nb_samples = out_buf.i_nb_samples;
block_Release( p_block );
......@@ -555,9 +555,9 @@ static void stereo2mono_downmix( aout_filter_t * p_filter,
/* out buffer characterisitcs */
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb;
p_out_buf->i_buffer = p_in_buf->i_buffer * i_output_nb / i_input_nb;
p_out = p_out_buf->p_buffer;
i_out_size = p_out_buf->i_nb_bytes;
i_out_size = p_out_buf->i_buffer;
/* Slide the overflow buffer */
p_overflow = p_sys->p_overflow_buffer;
......
......@@ -119,7 +119,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
int i;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb;
p_out_buf->i_buffer = p_in_buf->i_buffer * i_output_nb / i_input_nb;
if( p_filter->output.i_physical_channels == AOUT_CHANS_2_0 )
{
......@@ -312,17 +312,17 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
aout_filter.output.i_format = p_filter->fmt_out.i_codec;
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_buffer = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer;
out_buf.i_nb_bytes = p_out->i_buffer;
out_buf.i_buffer = p_out->i_buffer;
out_buf.i_nb_samples = p_out->i_nb_samples;
DoWork( (aout_instance_t *)p_filter, &aout_filter, &in_buf, &out_buf );
block_Release( p_block );
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_buffer = out_buf.i_buffer;
p_out->i_nb_samples = out_buf.i_nb_samples;
return p_out;
......
......@@ -119,7 +119,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
int32_t * p_src = (int32_t *)p_in_buf->p_buffer;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb;
p_out_buf->i_buffer = p_in_buf->i_buffer * i_output_nb / i_input_nb;
if ( (p_filter->output.i_original_channels & AOUT_CHAN_PHYSMASK)
!= (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK)
......
......@@ -246,7 +246,7 @@ static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter,
float *pf_ptr, f_diff = 0, f_frac = 0, f_temp = 0 ;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
p_out_buf->i_buffer = p_in_buf->i_buffer;
/* Process each sample */
for( int i = 0; i < i_samples ; i++ )
......
......@@ -392,7 +392,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = i_bytes_per_block * 6;
p_out_buf->i_buffer = i_bytes_per_block * 6;
}
/*****************************************************************************
......@@ -494,15 +494,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter.output.i_format = p_filter->fmt_out.i_codec;
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_buffer = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer;
out_buf.i_nb_bytes = p_out->i_buffer;
out_buf.i_buffer = p_out->i_buffer;
out_buf.i_nb_samples = p_out->i_nb_samples;
DoWork( (aout_instance_t *)p_filter, &aout_filter, &in_buf, &out_buf );
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_buffer = out_buf.i_buffer;
p_out->i_nb_samples = out_buf.i_nb_samples;
block_Release( p_block );
......
......@@ -90,7 +90,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
*/
static const uint8_t p_sync_le[6] = { 0x72, 0xF8, 0x1F, 0x4E, 0x01, 0x00 };
static const uint8_t p_sync_be[6] = { 0xF8, 0x72, 0x4E, 0x1F, 0x00, 0x01 };
uint16_t i_frame_size = p_in_buf->i_nb_bytes / 2;
uint16_t i_frame_size = p_in_buf->i_buffer / 2;
uint8_t * p_in = p_in_buf->p_buffer;
uint8_t * p_out = p_out_buf->p_buffer;
......@@ -115,6 +115,6 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
AOUT_SPDIF_SIZE - i_frame_size * 2 - 8 );
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = AOUT_SPDIF_SIZE;
p_out_buf->i_buffer = AOUT_SPDIF_SIZE;
}
......@@ -303,7 +303,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
&i_sample_rate, &i_bit_rate, &i_frame_length ) )
{
msg_Warn( p_aout, "libdca couldn't sync on frame" );
p_out_buf->i_nb_samples = p_out_buf->i_nb_bytes = 0;
p_out_buf->i_nb_samples = p_out_buf->i_buffer = 0;
return;
}
......@@ -361,7 +361,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = i_bytes_per_block * i;
p_out_buf->i_buffer = i_bytes_per_block * i;
}
/*****************************************************************************
......@@ -459,15 +459,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter.output.i_format = p_filter->fmt_out.i_codec;
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_buffer = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer;
out_buf.i_nb_bytes = p_out->i_buffer;
out_buf.i_buffer = p_out->i_buffer;
out_buf.i_nb_samples = p_out->i_nb_samples;
DoWork( (aout_instance_t *)p_filter, &aout_filter, &in_buf, &out_buf );
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_buffer = out_buf.i_buffer;
p_out->i_nb_samples = out_buf.i_nb_samples;
block_Release( p_block );
......
......@@ -117,28 +117,28 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
uint32_t i_ac5_spdif_type = 0;
uint16_t i_fz = p_in_buf->i_nb_samples * 4;
uint16_t i_frame, i_length = p_in_buf->i_nb_bytes;
uint16_t i_frame, i_length = p_in_buf->i_buffer;
static const uint8_t p_sync_le[6] = { 0x72, 0xF8, 0x1F, 0x4E, 0x00, 0x00 };
static const uint8_t p_sync_be[6] = { 0xF8, 0x72, 0x4E, 0x1F, 0x00, 0x00 };
if( p_in_buf->i_nb_bytes != p_filter->p_sys->i_frame_size )
if( p_in_buf->i_buffer != p_filter->p_sys->i_frame_size )
{
/* Frame size changed, reset everything */
msg_Warn( p_aout, "Frame size changed from %u to %u, "
"resetting everything.",
p_filter->p_sys->i_frame_size,
(unsigned)p_in_buf->i_nb_bytes );
(unsigned)p_in_buf->i_buffer );
p_filter->p_sys->i_frame_size = p_in_buf->i_nb_bytes;
p_filter->p_sys->i_frame_size = p_in_buf->i_buffer;
p_filter->p_sys->p_buf = realloc( p_filter->p_sys->p_buf,
p_in_buf->i_nb_bytes * 3 );
p_in_buf->i_buffer * 3 );
p_filter->p_sys->i_frames = 0;
}
/* Backup frame */
vlc_memcpy( p_filter->p_sys->p_buf + p_in_buf->i_nb_bytes *
vlc_memcpy( p_filter->p_sys->p_buf + p_in_buf->i_buffer *
p_filter->p_sys->i_frames,
p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
p_in_buf->p_buffer, p_in_buf->i_buffer );
p_filter->p_sys->i_frames++;
......@@ -150,7 +150,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Not enough data */
p_out_buf->i_nb_samples = 0;
p_out_buf->i_nb_bytes = 0;
p_out_buf->i_buffer = 0;
return;
}
......@@ -215,5 +215,5 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_out_buf->i_pts = p_filter->p_sys->start_date;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples * 3;
p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples * 4;
p_out_buf->i_buffer = p_out_buf->i_nb_samples * 4;
}
......@@ -146,7 +146,7 @@ static void Do_F32ToS16( aout_instance_t * p_aout, aout_filter_t * p_filter,
*p_out++ = s24_to_s16_pcm(*p_in++);
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes / 2;
p_out_buf->i_buffer = p_in_buf->i_buffer / 2;
}
......@@ -191,7 +191,7 @@ static void Do_S16ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes
p_out_buf->i_buffer = p_in_buf->i_buffer
* sizeof(vlc_fixed_t) / sizeof(int16_t);
}
......@@ -237,5 +237,5 @@ static void Do_U8ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * sizeof(vlc_fixed_t);
p_out_buf->i_buffer = p_in_buf->i_buffer * sizeof(vlc_fixed_t);
}
......@@ -174,7 +174,7 @@ static void Do_F32ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
p_out_buf->i_buffer = p_in_buf->i_buffer;
}
static void Do_FL32ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
......@@ -192,7 +192,7 @@ static void Do_FL32ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
p_out_buf->i_buffer = p_in_buf->i_buffer;
}
/*****************************************************************************
......@@ -247,7 +247,7 @@ static void Do_FL32ToS16( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes / 2;
p_out_buf->i_buffer = p_in_buf->i_buffer / 2;
}
/*****************************************************************************
......@@ -292,7 +292,7 @@ static void Do_FL32ToS8( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes / 4;
p_out_buf->i_buffer = p_in_buf->i_buffer / 4;
}
/*****************************************************************************
......@@ -337,7 +337,7 @@ static void Do_FL32ToU16( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes / 2;
p_out_buf->i_buffer = p_in_buf->i_buffer / 2;
}
/*****************************************************************************
......@@ -382,7 +382,7 @@ static void Do_FL32ToU8( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes / 4;
p_out_buf->i_buffer = p_in_buf->i_buffer / 4;
}
/*****************************************************************************
......@@ -445,7 +445,7 @@ static void Do_S16ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * 4 / 2;
p_out_buf->i_buffer = p_in_buf->i_buffer * 4 / 2;
}
static void Do_S24ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
......@@ -471,7 +471,7 @@ static void Do_S24ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * 4 / 3;
p_out_buf->i_buffer = p_in_buf->i_buffer * 4 / 3;
}
static void Do_S32ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
......@@ -490,7 +490,7 @@ static void Do_S32ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * 4 / 4;
p_out_buf->i_buffer = p_in_buf->i_buffer * 4 / 4;
}
/*****************************************************************************
......@@ -561,7 +561,7 @@ static void Do_S16ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
*p_out-- = (float)*p_in-- / 32768.0;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * 4 / 2;
p_out_buf->i_buffer = p_in_buf->i_buffer * 4 / 2;
}
static void Do_S24ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
......@@ -593,7 +593,7 @@ static void Do_S24ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * 4 / 3;
p_out_buf->i_buffer = p_in_buf->i_buffer * 4 / 3;
}
static void Do_S32ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
......@@ -612,7 +612,7 @@ static void Do_S32ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * 4 / 4;
p_out_buf->i_buffer = p_in_buf->i_buffer * 4 / 4;
}
......@@ -657,7 +657,7 @@ static void Do_S8ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * sizeof(float);
p_out_buf->i_buffer = p_in_buf->i_buffer * sizeof(float);
}
/*****************************************************************************
......@@ -701,5 +701,5 @@ static void Do_U8ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * sizeof(float);
p_out_buf->i_buffer = p_in_buf->i_buffer * sizeof(float);
}
......@@ -129,12 +129,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_samples * sizeof(vlc_fixed_t) *
p_out_buf->i_buffer = p_in_buf->i_nb_samples * sizeof(vlc_fixed_t) *
aout_FormatNbChannels( &p_filter->output );
/* Do the actual decoding now. */
mad_stream_buffer( &p_sys->mad_stream, p_in_buf->p_buffer,
p_in_buf->i_nb_bytes );
p_in_buf->i_buffer );
if ( mad_frame_decode( &p_sys->mad_frame, &p_sys->mad_stream ) == -1 )
{
msg_Dbg( p_aout, "libmad error: %s",
......@@ -151,7 +151,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if( p_filter->output.i_format == VLC_CODEC_FL32 )
{
int i;
int i_size = p_out_buf->i_nb_bytes / sizeof(float);
int i_size = p_out_buf->i_buffer / sizeof(float);
float * a = (float *)p_out_buf->p_buffer;
for ( i = 0 ; i < i_size ; i++ )
......@@ -159,7 +159,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
else
{
memset( p_out_buf->p_buffer, 0, p_out_buf->i_nb_bytes );
memset( p_out_buf->p_buffer, 0, p_out_buf->i_buffer );
}
p_sys->i_reject_count--;
return;
......@@ -396,17 +396,17 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_flags = 0;
in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_buffer = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer;
out_buf.i_nb_bytes = p_out->i_buffer;
out_buf.i_buffer = p_out->i_buffer;
out_buf.i_nb_samples = p_out->i_nb_samples;
DoWork( (aout_instance_t *)p_filter, &aout_filter, &in_buf, &out_buf );
block_Release( p_block );
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_buffer = out_buf.i_buffer;
p_out->i_nb_samples = out_buf.i_nb_samples;
return p_out;
......
......@@ -133,7 +133,7 @@ static void Do_F32_S32 (aout_instance_t *aout, aout_filter_t *filter,
: "q0", "q1", "memory");
outbuf->i_nb_samples = inbuf->i_nb_samples;
outbuf->i_nb_bytes = inbuf->i_nb_bytes;
outbuf->i_buffer = inbuf->i_buffer;
(void) aout;
}
......@@ -196,6 +196,6 @@ static void Do_S32_S16 (aout_instance_t *aout, aout_filter_t *filter,
: "q0", "q1", "q2", "q3", "memory");
outbuf->i_nb_samples = inbuf->i_nb_samples;
outbuf->i_nb_bytes = inbuf->i_nb_bytes / 2;
outbuf->i_buffer = inbuf->i_buffer / 2;
(void) aout;
}
......@@ -213,7 +213,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
VLC_UNUSED(p_aout);
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
p_out_buf->i_buffer = p_in_buf->i_buffer;
EqzFilter( p_filter, (float*)p_out_buf->p_buffer,
(float*)p_in_buf->p_buffer, p_in_buf->i_nb_samples,
......
......@@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this )
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
p_out_buf->i_buffer = p_in_buf->i_buffer;
/* Calculate the average power level on this buffer */
for( i = 0 ; i < i_samples; i++ )
......
......@@ -189,7 +189,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
VLC_UNUSED(p_aout);
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
p_out_buf->i_buffer = p_in_buf->i_buffer;
ProcessEQ( (float*)p_in_buf->p_buffer, (float*)p_out_buf->p_buffer,
p_filter->p_sys->p_state,
......
......@@ -204,13 +204,13 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if( /*p_filter->b_continuity && /--* What difference does it make ? :) */
p_sys->i_old_wing &&
p_in_buf->i_size >=
p_in_buf->i_nb_bytes + p_sys->i_old_wing *
p_in_buf->i_buffer + p_sys->i_old_wing *
p_filter->input.i_bytes_per_frame )
{
/* output the whole thing with the samples from last time */
memmove( ((float *)(p_in_buf->p_buffer)) +
i_nb_channels * p_sys->i_old_wing,
p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
p_in_buf->p_buffer, p_in_buf->i_buffer );
memcpy( p_in_buf->p_buffer, p_sys->p_buf +
i_nb_channels * p_sys->i_old_wing,
p_sys->i_old_wing *
......@@ -224,7 +224,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
date_Increment( &p_sys->end_date,
p_out_buf->i_nb_samples ) - p_out_buf->i_pts;
p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples *
p_out_buf->i_buffer = p_out_buf->i_nb_samples *
p_filter->input.i_bytes_per_frame;
}
p_filter->b_continuity = false;
......@@ -458,7 +458,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_out_buf->i_length = date_Increment( &p_sys->end_date,
p_out_buf->i_nb_samples ) - p_out_buf->i_pts;
p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples *
p_out_buf->i_buffer = p_out_buf->i_nb_samples *
i_nb_channels * sizeof(int32_t);
}
......@@ -586,17 +586,17 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
p_filter->p_sys->b_first = false;
in_buf.p_buffer = p_block->p_buffer;
in_buf.i_nb_bytes = in_buf.i_size = p_block->i_buffer;
in_buf.i_buffer = in_buf.i_size = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer;
out_buf.i_nb_bytes = out_buf.i_size = p_out->i_buffer;
out_buf.i_buffer = out_buf.i_size = p_out->i_buffer;
out_buf.i_nb_samples = p_out->i_nb_samples;
DoWork( (aout_instance_t *)p_filter, &aout_filter, &in_buf, &out_buf );
block_Release( p_block );
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_buffer = out_buf.i_buffer;
p_out->i_nb_samples = out_buf.i_nb_samples;
return p_out;
......
......@@ -149,11 +149,11 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
if( p_filter->b_continuity &&
p_in_buf->i_size >=
p_in_buf->i_nb_bytes + sizeof(float) * i_nb_channels )
p_in_buf->i_buffer + sizeof(float) * i_nb_channels )
{
/* output the whole thing with the last sample from last time */
memmove( ((float *)(p_in_buf->p_buffer)) + i_nb_channels,
p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
p_in_buf->p_buffer, p_in_buf->i_buffer );
memcpy( p_in_buf->p_buffer, p_prev_sample,
i_nb_channels * sizeof(float) );
}
......@@ -161,9 +161,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
return;
}
float p_in_orig[p_in_buf->i_nb_bytes / 4], *p_in = p_in_orig;
float p_in_orig[p_in_buf->i_buffer / 4], *p_in = p_in_orig;
vlc_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
vlc_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_buffer );
/* Take care of the previous input sample (if any) */
if( !p_filter->b_continuity )
....