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;
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 )
/* 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;
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 );
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 */
#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 );
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 );
/* 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;
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 )
{
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;
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)
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++ )
}
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;
}
/*****************************************************************************
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 );
*/
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;
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;
}
&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;
}
}
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;
}
/*****************************************************************************
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 );
{
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++;
/* Not enough data */
p_out_buf->i_nb_samples = 0;
- p_out_buf->i_nb_bytes = 0;
+ p_out_buf->i_buffer = 0;
return;
}
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;
}
*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;
}
}
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);
}
}
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);
}
}
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,
}
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;
}
/*****************************************************************************
}
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;
}
/*****************************************************************************
}
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;
}
/*****************************************************************************
}
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;
}
/*****************************************************************************
}
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;
}
/*****************************************************************************
}
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,
}
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,
}
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;
}
/*****************************************************************************
*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,
}
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,
}
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;
}
}
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);
}
/*****************************************************************************
}
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);
}
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",
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++ )
}
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;
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;
: "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;
}
: "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;
}
{
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,
}
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++ )
{
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,
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 *
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;
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);
}
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;
{
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) );
}
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 )
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);
}
aout_filter.b_continuity = false;
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;
}
p_out_buf->i_nb_samples = i_out_nb;
- p_out_buf->i_nb_bytes = i_out_nb * i_sample_bytes;
+ p_out_buf->i_buffer = i_out_nb * i_sample_bytes;
p_out_buf->i_pts = p_in_buf->i_pts;
p_out_buf->i_length = p_out_buf->i_nb_samples *
1000000 / p_filter->output.i_rate;
return;
}
- int32_t p_in_orig[p_in_buf->i_nb_bytes / sizeof(int32_t)],
+ int32_t p_in_orig[p_in_buf->i_buffer / sizeof(int32_t)],
*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 );
for( i_out = i_out_nb ; i_out-- ; )
{
}
p_out_buf->i_nb_samples = i_out_nb;
- p_out_buf->i_nb_bytes = i_out_nb * i_sample_bytes;
+ p_out_buf->i_buffer = i_out_nb * i_sample_bytes;
p_out_buf->i_pts = p_in_buf->i_pts;
p_out_buf->i_length = p_out_buf->i_nb_samples *
1000000 / p_filter->output.i_rate;
aout_filter_sys_t *p = p_filter->p_sys;
if( p_filter->input.i_rate == p->sample_rate ) {
- memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
- p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
+ memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer, p_in_buf->i_buffer );
+ p_out_buf->i_buffer = p_in_buf->i_buffer;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
return;
}
(int)( p->bytes_stride / p->bytes_per_frame ) );
}
- size_t i_outsize = calculate_output_buffer_size ( p_filter, p_in_buf->i_nb_bytes );
+ size_t i_outsize = calculate_output_buffer_size ( p_filter, p_in_buf->i_buffer );
if( i_outsize > p_out_buf->i_size ) {
void *temp = realloc( p->p_buffers[ p->i_buf ], i_outsize );
if( temp == NULL )
}
size_t bytes_out = transform_buffer( p_filter,
- p_in_buf->p_buffer, p_in_buf->i_nb_bytes,
+ p_in_buf->p_buffer, p_in_buf->i_buffer,
p_out_buf->p_buffer );
- p_out_buf->i_nb_bytes = bytes_out;
+ p_out_buf->i_buffer = bytes_out;
p_out_buf->i_nb_samples = bytes_out / p->bytes_per_frame;
}
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
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;
SpatFilter( p_aout, p_filter, (float*)p_out_buf->p_buffer,
(float*)p_in_buf->p_buffer, p_in_buf->i_nb_samples,
unsigned i = 0;
aout_mixer_input_t * p_input = p_mixer->input[i];
int i_nb_channels = aout_FormatNbChannels( &p_mixer->fmt );
- int i_nb_bytes = p_buffer->i_nb_samples * sizeof(int32_t)
+ int i_buffer = p_buffer->i_nb_samples * sizeof(int32_t)
* i_nb_channels;
uint8_t * p_in;
uint8_t * p_out;
* sizeof(int32_t)
* i_nb_channels;
- if ( i_available_bytes < i_nb_bytes )
+ if ( i_available_bytes < i_buffer )
{
aout_buffer_t * p_old_buffer;
vlc_memcpy( p_out, p_in, i_available_bytes );
- i_nb_bytes -= i_available_bytes;
+ i_buffer -= i_available_bytes;
p_out += i_available_bytes;
/* Next buffer */
}
else
{
- vlc_memcpy( p_out, p_in, i_nb_bytes );
- p_input->begin = p_in + i_nb_bytes;
+ vlc_memcpy( p_out, p_in, i_buffer );
+ p_input->begin = p_in + i_buffer;
break;
}
}
if( p_buffer != NULL )
{
- uint32_t i_second_mData_bytes = __MIN( p_buffer->i_nb_bytes, ioData->mBuffers[0].mDataByteSize - i_mData_bytes );
+ uint32_t i_second_mData_bytes = __MIN( p_buffer->i_buffer, ioData->mBuffers[0].mDataByteSize - i_mData_bytes );
vlc_memcpy( (uint8_t *)ioData->mBuffers[0].mData + i_mData_bytes,
p_buffer->p_buffer, i_second_mData_bytes );
if( i_mData_bytes >= ioData->mBuffers[0].mDataByteSize )
{
- p_sys->i_total_bytes = p_buffer->i_nb_bytes - i_second_mData_bytes;
+ p_sys->i_total_bytes = p_buffer->i_buffer - i_second_mData_bytes;
vlc_memcpy( p_sys->p_remainder_buffer,
&p_buffer->p_buffer[i_second_mData_bytes],
p_sys->i_total_bytes );
#define BUFFER outOutputData->mBuffers[p_sys->i_stream_index]
if( p_buffer != NULL )
{
- if( (int)BUFFER.mDataByteSize != (int)p_buffer->i_nb_bytes)
- msg_Warn( p_aout, "bytesize: %d nb_bytes: %d", (int)BUFFER.mDataByteSize, (int)p_buffer->i_nb_bytes );
+ if( (int)BUFFER.mDataByteSize != (int)p_buffer->i_buffer)
+ msg_Warn( p_aout, "bytesize: %d nb_bytes: %d", (int)BUFFER.mDataByteSize, (int)p_buffer->i_buffer );
/* move data into output data buffer */
- vlc_memcpy( BUFFER.mData, p_buffer->p_buffer, p_buffer->i_nb_bytes );
+ vlc_memcpy( BUFFER.mData, p_buffer->p_buffer, p_buffer->i_buffer );
aout_BufferFree( p_buffer );
}
else
if( p_sys->b_chan_reorder )
{
/* Do the channel reordering here */
- aout_ChannelReorder( p_buffer->p_buffer, p_buffer->i_nb_bytes,
+ aout_ChannelReorder( p_buffer->p_buffer, p_buffer->i_buffer,
p_sys->i_channels, p_sys->pi_chan_table,
p_sys->i_bits_per_sample );
}
p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo );
- if( fwrite( p_buffer->p_buffer, p_buffer->i_nb_bytes, 1,
+ if( fwrite( p_buffer->p_buffer, p_buffer->i_buffer, 1,
p_aout->output.p_sys->p_file ) != 1 )
{
msg_Err( p_aout, "write error (%m)" );
if( p_aout->output.p_sys->b_add_wav_header )
{
/* Update Wave Header */
- p_aout->output.p_sys->waveh.DataLength += p_buffer->i_nb_bytes;
+ p_aout->output.p_sys->waveh.DataLength += p_buffer->i_buffer;
}
aout_BufferFree( p_buffer );
if ( p_buffer != NULL )
{
p_bytes = p_buffer->p_buffer;
- i_size = p_buffer->i_nb_bytes;
+ i_size = p_buffer->i_buffer;
/* This is theoretical ... we'll see next iteration whether
* we're drifting */
next_date += p_buffer->i_length;
if( p_sys->b_chan_reorder )
{
/* Do the channel reordering here */
- aout_ChannelReorder( p_buffer->p_buffer, p_buffer->i_nb_bytes,
+ aout_ChannelReorder( p_buffer->p_buffer, p_buffer->i_buffer,
p_sys->i_channels, p_sys->pi_chan_table,
p_sys->i_bits_per_sample );
}
if ( p_buffer != NULL )
{
- PULSE_DEBUG( "Pulse stream request write buffer %d", p_buffer->i_nb_bytes);
- pa_stream_write(p_sys->stream, p_buffer->p_buffer, p_buffer->i_nb_bytes, NULL, 0, PA_SEEK_RELATIVE);
- length -= p_buffer->i_nb_bytes;
+ PULSE_DEBUG( "Pulse stream request write buffer %d", p_buffer->i_buffer);
+ pa_stream_write(p_sys->stream, p_buffer->p_buffer, p_buffer->i_buffer, NULL, 0, PA_SEEK_RELATIVE);
+ length -= p_buffer->i_buffer;
aout_BufferFree( p_buffer );
}
else
if( p_buffer && p_sys->b_chan_reorder )
{
aout_ChannelReorder( p_buffer->p_buffer,
- p_buffer->i_nb_bytes,
+ p_buffer->i_buffer,
p_sys->waveformat.Format.nChannels,
p_sys->pi_chan_table,
p_sys->waveformat.Format.wBitsPerSample );
int16_t *s = (int16_t*)p_out->p_buffer;
unsigned int i;
- for( i = 0; i < p_out->i_nb_bytes / 2; i++ )
+ for( i = 0; i < p_out->i_buffer / 2; i++ )
{
*s++ = p_sys->p_logtos16[*p_block->p_buffer++];
p_block->i_buffer--;
}
else
{
- memcpy( p_out->p_buffer, p_block->p_buffer, p_out->i_nb_bytes );
- p_block->p_buffer += p_out->i_nb_bytes;
- p_block->i_buffer -= p_out->i_nb_bytes;
+ memcpy( p_out->p_buffer, p_block->p_buffer, p_out->i_buffer );
+ p_block->p_buffer += p_out->i_buffer;
+ p_block->i_buffer -= p_out->i_buffer;
}
return p_out;
encoder_sys_t *p_sys = p_enc->p_sys;
block_t *p_block = NULL;
- if( !p_aout_buf || !p_aout_buf->i_nb_bytes ) return NULL;
+ if( !p_aout_buf || !p_aout_buf->i_buffer ) return NULL;
if( p_sys->i_s16tolog )
{
- if( ( p_block = block_New( p_enc, p_aout_buf->i_nb_bytes / 2 ) ) )
+ if( ( p_block = block_New( p_enc, p_aout_buf->i_buffer / 2 ) ) )
{
int8_t *s = (int8_t*)p_block->p_buffer; // sink
int16_t *aout = (int16_t*)p_aout_buf->p_buffer; // source
if( p_sys->i_s16tolog == ALAW )
{
- for( i = 0; i < p_aout_buf->i_nb_bytes / 2; i++ )
+ for( i = 0; i < p_aout_buf->i_buffer / 2; i++ )
{
if( *aout >= 0)
*s++ = alaw_encode[*aout / 16];
}
else /* ULAW */
{
- for( i = 0; i < p_aout_buf->i_nb_bytes / 2; i++ )
+ for( i = 0; i < p_aout_buf->i_buffer / 2; i++ )
{
if( *aout >= 0)
*s++ = ulaw_encode[*aout / 4];
}
}
}
- else if( ( p_block = block_New( p_enc, p_aout_buf->i_nb_bytes ) ) )
+ else if( ( p_block = block_New( p_enc, p_aout_buf->i_buffer ) ) )
{
memcpy( p_block->p_buffer, p_aout_buf->p_buffer,
- p_aout_buf->i_nb_bytes );
+ p_aout_buf->i_buffer );
}
if( p_block )
p_sys->p_samples, p_sys->p_context->channels, i_samples,
p_sys->pi_extraction, p_dec->fmt_out.audio.i_bitspersample );
else
- memcpy( p_buffer->p_buffer, p_sys->p_samples, p_buffer->i_nb_bytes );
+ memcpy( p_buffer->p_buffer, p_sys->p_samples, p_buffer->i_buffer );
p_sys->p_samples += i_samples * p_sys->p_context->channels * ( p_dec->fmt_out.audio.i_bitspersample / 8 );
p_sys->i_samples -= i_samples;
else
{
aout_buffer_t *p_aout_buffer = (aout_buffer_t *)p_data;
- p_block_in = block_New( p_enc, p_aout_buffer->i_nb_bytes );
+ p_block_in = block_New( p_enc, p_aout_buffer->i_buffer );
memcpy( p_block_in->p_buffer, p_aout_buffer->p_buffer,
p_block_in->i_buffer );
p_buf = decoder_NewAudioBuffer( p_dec, p_sys->i_frame_length * 4 );
if( p_buf == NULL ) return NULL;
p_buf->i_nb_samples = p_sys->i_frame_length;
- p_buf->i_nb_bytes = p_sys->i_frame_size;
+ p_buf->i_buffer = p_sys->i_frame_size;
p_buf->i_pts = date_Get( &p_sys->end_date );
p_buf->i_length = date_Increment( &p_sys->end_date, p_sys->i_frame_length )
p_sys->i_samples_delay += p_aout_buf->i_nb_samples;
/* Convert samples to FLAC__int32 */
- if( p_sys->i_buffer < p_aout_buf->i_nb_bytes * 2 )
+ if( p_sys->i_buffer < p_aout_buf->i_buffer * 2 )
{
p_sys->p_buffer =
- realloc( p_sys->p_buffer, p_aout_buf->i_nb_bytes * 2 );
- p_sys->i_buffer = p_aout_buf->i_nb_bytes * 2;
+ realloc( p_sys->p_buffer, p_aout_buf->i_buffer * 2 );
+ p_sys->i_buffer = p_aout_buf->i_buffer * 2;
}
- for( i = 0 ; i < p_aout_buf->i_nb_bytes / 2 ; i++ )
+ for( i = 0 ; i < p_aout_buf->i_buffer / 2 ; i++ )
{
p_sys->p_buffer[i]= ((int16_t *)p_aout_buf->p_buffer)[i];
}
p_sys->b_discontinuity = false;
/* Hack for libmad filter */
- p_buf->i_nb_bytes = p_sys->i_frame_size + MAD_BUFFER_GUARD;
+ p_buf->i_buffer = p_sys->i_frame_size + MAD_BUFFER_GUARD;
return p_buf;
}
memcpy( p_out->p_buffer,
&p_sys->out_buffer[2 * p_sys->i_out * p_dec->fmt_out.audio.i_channels],
- p_out->i_nb_bytes );
+ p_out->i_buffer );
p_sys->i_out += i_frames;
}
if( !p_block ) goto buffered; /* just return a block if we can */
/* Put the PCM samples sent by VLC in the Fifo */
- while( p_sys->i_buffer + p_block->i_nb_bytes >= pcm_chunk_size )
+ while( p_sys->i_buffer + p_block->i_buffer >= pcm_chunk_size )
{
unsigned int i_buffer = 0;
p_pcm_block = block_New( p_enc, pcm_chunk_size );
p_block->p_buffer, pcm_chunk_size - i_buffer );
p_block->p_buffer += pcm_chunk_size - i_buffer;
- p_block->i_nb_bytes -= pcm_chunk_size - i_buffer;
+ p_block->i_buffer -= pcm_chunk_size - i_buffer;
block_FifoPut( p_sys->p_fifo, p_pcm_block );
}
/* We hadn't enough data to make a block, put it in standby */
- if( p_block->i_nb_bytes )
+ if( p_block->i_buffer )
{
uint8_t *p_tmp;
if( p_sys->i_buffer > 0 )
- p_tmp = realloc( p_sys->p_buffer, p_block->i_nb_bytes + p_sys->i_buffer );
+ p_tmp = realloc( p_sys->p_buffer, p_block->i_buffer + p_sys->i_buffer );
else
- p_tmp = malloc( p_block->i_nb_bytes );
+ p_tmp = malloc( p_block->i_buffer );
if( !p_tmp )
{
}
p_sys->p_buffer = p_tmp;
vlc_memcpy( p_sys->p_buffer + p_sys->i_buffer,
- p_block->p_buffer, p_block->i_nb_bytes );
+ p_block->p_buffer, p_block->i_buffer );
- p_sys->i_buffer += p_block->i_nb_bytes;
- p_block->i_nb_bytes = 0;
+ p_sys->i_buffer += p_block->i_buffer;
+ p_block->i_buffer = 0;
}
buffered:
{
block_t *p_pcm_block;
block_t *p_chain = NULL;
- unsigned int i_samples = p_block->i_nb_bytes >> 2 /* s16l stereo */;
+ unsigned int i_samples = p_block->i_buffer >> 2 /* s16l stereo */;
mtime_t start_date = p_block->i_pts;
start_date -= (mtime_t)i_samples * (mtime_t)1000000 / (mtime_t)p_enc->fmt_out.audio.i_rate;
*/
p_aout_buffer = decoder_NewAudioBuffer( p_dec,
p_sys->p_header->frame_size );
- if ( !p_aout_buffer || p_aout_buffer->i_nb_bytes == 0 )
+ if ( !p_aout_buffer || p_aout_buffer->i_buffer == 0 )
{
msg_Err(p_dec, "Oops: No new buffer was returned!");
return NULL;
p_buffer->i_length = date_Increment( &p_sys->end_date, i_samples )
- p_buffer->i_pts;
- memcpy( p_buffer->p_buffer, p_sys->p_samples, p_buffer->i_nb_bytes );
- p_sys->p_samples += p_buffer->i_nb_bytes;
+ memcpy( p_buffer->p_buffer, p_sys->p_samples, p_buffer->i_buffer );
+ p_sys->p_samples += p_buffer->i_buffer;
p_sys->i_samples -= i_samples;
return p_buffer;
if( p_aout_buffer != NULL )
{
vlc_memcpy( p_buffer, p_aout_buffer->p_buffer,
- MIN( i_size, p_aout_buffer->i_nb_bytes ) );
- if( p_aout_buffer->i_nb_bytes < i_size )
+ MIN( i_size, p_aout_buffer->i_buffer ) );
+ if( p_aout_buffer->i_buffer < i_size )
{
- vlc_memset( p_buffer + p_aout_buffer->i_nb_bytes,
- 0, i_size - p_aout_buffer->i_nb_bytes );
+ vlc_memset( p_buffer + p_aout_buffer->i_buffer,
+ 0, i_size - p_aout_buffer->i_buffer );
}
aout_BufferFree( p_aout_buffer );
}
if ( p_buffer != NULL )
{
p_bytes = p_buffer->p_buffer;
- i_size = p_buffer->i_nb_bytes;
+ i_size = p_buffer->i_buffer;
}
else
{
}
p_audio_block = p_audio_buf->p_sys;
- p_audio_block->i_buffer = p_audio_buf->i_nb_bytes;
+ p_audio_block->i_buffer = p_audio_buf->i_buffer;
p_audio_block->i_dts = p_audio_block->i_pts =
p_audio_buf->i_pts;
p_audio_block->i_length = p_audio_buf->i_length;
assert( p_audio_block );
p_audio_buf->p_buffer = p_audio_block->p_buffer;
- p_audio_buf->i_nb_bytes = p_audio_block->i_buffer;
+ p_audio_buf->i_buffer = p_audio_block->i_buffer;
p_audio_buf->i_nb_samples = p_audio_block->i_nb_samples;
p_audio_buf->i_pts = p_audio_block->i_dts;
p_audio_buf->i_length = p_audio_block->i_length;
p_buffer->p_sys = p_block = block_New( p_dec, i_size );
p_buffer->p_buffer = p_block->p_buffer;
- p_buffer->i_size = p_buffer->i_nb_bytes = p_block->i_buffer;
+ p_buffer->i_size = p_buffer->i_buffer = p_block->i_buffer;
p_buffer->i_nb_samples = i_samples;
p_block->i_nb_samples = i_samples;
block_t *p_block;
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;
/* Queue sample */
vlc_mutex_lock( &p_sys->p_thread->lock );
return;
}
- p_block = block_New( p_sys->p_thread, p_in_buf->i_nb_bytes );
+ p_block = block_New( p_sys->p_thread, p_in_buf->i_buffer );
if( !p_block )
{
vlc_mutex_unlock( &p_sys->p_thread->lock );
return;
}
- memcpy( p_block->p_buffer, p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
+ memcpy( p_block->p_buffer, p_in_buf->p_buffer, p_in_buf->i_buffer );
p_block->i_pts = p_in_buf->i_pts;
p_sys->p_thread->pp_blocks[p_sys->p_thread->i_blocks++] = p_block;
projectm_thread_t *p_thread = p_filter->p_sys->p_thread;
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;
vlc_mutex_lock( &p_thread->lock );
if( p_thread->i_buffer_size > 0 )
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 *
+ p_out_buf->i_buffer = p_in_buf->i_buffer *
aout_FormatNbChannels( &p_filter->output ) /
aout_FormatNbChannels( &p_filter->input );
/* This necessarily allocates in the heap. */
p_buffer = aout_BufferAlloc( &p_input->input_alloc, duration, NULL );
if( p_buffer != NULL )
- p_buffer->i_nb_bytes = i_nb_samples * p_input->input.i_bytes_per_frame
+ p_buffer->i_buffer = i_nb_samples * p_input->input.i_bytes_per_frame
/ p_input->input.i_frame_length;
/* Suppose the decoder doesn't have more than one buffered buffer */
p_new_buffer = aout_BufferAlloc( &p_input->input_alloc, duration, NULL);
vlc_memcpy( p_new_buffer->p_buffer, p_buffer->p_buffer,
- p_buffer->i_nb_bytes );
+ p_buffer->i_buffer );
p_new_buffer->i_nb_samples = p_buffer->i_nb_samples;
- p_new_buffer->i_nb_bytes = p_buffer->i_nb_bytes;
+ p_new_buffer->i_buffer = p_buffer->i_buffer;
p_new_buffer->i_pts = p_buffer->i_pts;
p_new_buffer->i_length = p_buffer->i_length;
aout_BufferFree( p_buffer );
p_output_buffer->i_pts = (*pp_input_buffer)->i_pts;
p_output_buffer->i_length = (*pp_input_buffer)->i_length;
- /* Please note that p_output_buffer->i_nb_samples & i_nb_bytes
+ /* Please note that p_output_buffer->i_nb_samples & i_buffer
* shall be set by the filter plug-in. */
if( (*pp_input_buffer)->i_nb_samples > 0 )
{
}
else
{
- p_output_buffer->i_nb_bytes = 0;
+ p_output_buffer->i_buffer = 0;
p_output_buffer->i_nb_samples = 0;
}
{
/* Additionally check that p_first_byte_to_mix is well
* located. */
- mtime_t i_nb_bytes = (start_date - p_buffer->i_pts)
+ mtime_t i_buffer = (start_date - p_buffer->i_pts)
* p_aout->p_mixer->fmt.i_bytes_per_frame
* p_aout->p_mixer->fmt.i_rate
/ p_aout->p_mixer->fmt.i_frame_length
}
mixer_nb_bytes = p_input->mixer.begin - p_buffer->p_buffer;
- if ( !((i_nb_bytes + p_aout->p_mixer->fmt.i_bytes_per_frame
+ if ( !((i_buffer + p_aout->p_mixer->fmt.i_bytes_per_frame
> mixer_nb_bytes) &&
- (i_nb_bytes < p_aout->p_mixer->fmt.i_bytes_per_frame
+ (i_buffer < p_aout->p_mixer->fmt.i_bytes_per_frame
+ mixer_nb_bytes)) )
{
msg_Warn( p_aout, "mixer start isn't output start (%"PRId64")",
- i_nb_bytes - mixer_nb_bytes );
+ i_buffer - mixer_nb_bytes );
/* Round to the nearest multiple */
- i_nb_bytes /= p_aout->p_mixer->fmt.i_bytes_per_frame;
- i_nb_bytes *= p_aout->p_mixer->fmt.i_bytes_per_frame;
- if( i_nb_bytes < 0 )
+ i_buffer /= p_aout->p_mixer->fmt.i_bytes_per_frame;
+ i_buffer *= p_aout->p_mixer->fmt.i_bytes_per_frame;
+ if( i_buffer < 0 )
{
/* Is it really the best way to do it ? */
aout_lock_output_fifo( p_aout );
break;
}
- p_input->mixer.begin = p_buffer->p_buffer + i_nb_bytes;
+ p_input->mixer.begin = p_buffer->p_buffer + i_buffer;
}
}
}
if ( p_aout->p_mixer->allocation.b_alloc )
{
p_output_buffer->i_nb_samples = p_aout->output.i_nb_samples;
- p_output_buffer->i_nb_bytes = p_aout->output.i_nb_samples
+ p_output_buffer->i_buffer = p_aout->output.i_nb_samples
* p_aout->p_mixer->fmt.i_bytes_per_frame
/ p_aout->p_mixer->fmt.i_frame_length;
}
p_aout->output.i_nb_filters,
&p_buffer );
- if( p_buffer->i_nb_bytes == 0 )
+ if( p_buffer->i_buffer == 0 )
{
aout_BufferFree( p_buffer );
return;