Commit c58b24c5 authored by Laurent Aimar's avatar Laurent Aimar

Used date_t instead of audio_date_t in audio filters.

parent c09763be
...@@ -83,7 +83,7 @@ struct filter_sys_t ...@@ -83,7 +83,7 @@ struct filter_sys_t
unsigned int i_remainder; /* remainder of previous sample */ unsigned int i_remainder; /* remainder of previous sample */
audio_date_t end_date; date_t end_date;
bool b_first; bool b_first;
bool b_filter2; bool b_filter2;
...@@ -219,10 +219,10 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -219,10 +219,10 @@ 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_samples = p_in_buf->i_nb_samples +
p_sys->i_old_wing; p_sys->i_old_wing;
p_out_buf->start_date = aout_DateGet( &p_sys->end_date ); p_out_buf->start_date = date_Get( &p_sys->end_date );
p_out_buf->end_date = p_out_buf->end_date =
aout_DateIncrement( &p_sys->end_date, date_Increment( &p_sys->end_date,
p_out_buf->i_nb_samples ); p_out_buf->i_nb_samples );
p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples * p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples *
p_filter->input.i_bytes_per_frame; p_filter->input.i_bytes_per_frame;
...@@ -238,8 +238,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -238,8 +238,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
* everything. */ * everything. */
p_filter->b_continuity = true; p_filter->b_continuity = true;
p_sys->i_remainder = 0; p_sys->i_remainder = 0;
aout_DateInit( &p_sys->end_date, i_out_rate ); date_Init( &p_sys->end_date, i_out_rate, 1 );
aout_DateSet( &p_sys->end_date, p_in_buf->start_date ); date_Set( &p_sys->end_date, p_in_buf->start_date );
p_sys->i_old_rate = p_filter->input.i_rate; p_sys->i_old_rate = p_filter->input.i_rate;
p_sys->d_old_factor = 1; p_sys->d_old_factor = 1;
p_sys->i_old_wing = 0; p_sys->i_old_wing = 0;
...@@ -454,9 +454,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -454,9 +454,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Finalize aout buffer */ /* Finalize aout buffer */
p_out_buf->i_nb_samples = i_out; p_out_buf->i_nb_samples = i_out;
p_out_buf->start_date = aout_DateGet( &p_sys->end_date ); p_out_buf->start_date = date_Get( &p_sys->end_date );
p_out_buf->end_date = aout_DateIncrement( &p_sys->end_date, p_out_buf->end_date = date_Increment( &p_sys->end_date,
p_out_buf->i_nb_samples ); p_out_buf->i_nb_samples );
p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples * p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples *
i_nb_channels * sizeof(int32_t); i_nb_channels * sizeof(int32_t);
......
...@@ -57,7 +57,7 @@ struct filter_sys_t ...@@ -57,7 +57,7 @@ struct filter_sys_t
unsigned int i_remainder; /* remainder of previous sample */ unsigned int i_remainder; /* remainder of previous sample */
audio_date_t end_date; date_t end_date;
}; };
/***************************************************************************** /*****************************************************************************
...@@ -107,7 +107,7 @@ static int Create( vlc_object_t *p_this ) ...@@ -107,7 +107,7 @@ static int Create( vlc_object_t *p_this )
free( p_sys ); free( p_sys );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
aout_DateInit( &p_sys->end_date, p_filter->output.i_rate ); date_Init( &p_sys->end_date, p_filter->output.i_rate, 1 );
p_filter->pf_do_work = DoWork; p_filter->pf_do_work = DoWork;
...@@ -170,7 +170,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -170,7 +170,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{ {
p_filter->b_continuity = true; p_filter->b_continuity = true;
p_sys->i_remainder = 0; p_sys->i_remainder = 0;
aout_DateInit( &p_sys->end_date, p_filter->output.i_rate ); date_Init( &p_sys->end_date, p_filter->output.i_rate, 1 );
} }
else else
{ {
...@@ -226,12 +226,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -226,12 +226,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_out_buf->start_date = p_in_buf->start_date; p_out_buf->start_date = p_in_buf->start_date;
if( p_in_buf->start_date != if( p_in_buf->start_date !=
aout_DateGet( &p_sys->end_date ) ) date_Get( &p_sys->end_date ) )
{ {
aout_DateSet( &p_sys->end_date, p_in_buf->start_date ); date_Set( &p_sys->end_date, p_in_buf->start_date );
} }
p_out_buf->end_date = aout_DateIncrement( &p_sys->end_date, p_out_buf->end_date = date_Increment( &p_sys->end_date,
p_out_buf->i_nb_samples ); p_out_buf->i_nb_samples );
p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples * p_out_buf->i_nb_bytes = p_out_buf->i_nb_samples *
...@@ -265,7 +265,7 @@ static int OpenFilter( vlc_object_t *p_this ) ...@@ -265,7 +265,7 @@ static int OpenFilter( vlc_object_t *p_this )
free( p_sys ); free( p_sys );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
aout_DateInit( &p_sys->end_date, p_filter->fmt_in.audio.i_rate ); date_Init( &p_sys->end_date, p_filter->fmt_in.audio.i_rate, 1 );
p_filter->pf_audio_filter = Resample; p_filter->pf_audio_filter = Resample;
......
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