[vlc-devel] commit: Used date_t instead of audio_date_t in audio filters. ( Laurent Aimar )
git version control
git at videolan.org
Thu Aug 13 21:42:40 CEST 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Aug 13 21:24:28 2009 +0200| [c58b24c5da0133d8564d433a1d80690e5720d859] | committer: Laurent Aimar
Used date_t instead of audio_date_t in audio filters.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c58b24c5da0133d8564d433a1d80690e5720d859
---
modules/audio_filter/resampler/bandlimited.c | 18 +++++++++---------
modules/audio_filter/resampler/linear.c | 14 +++++++-------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/modules/audio_filter/resampler/bandlimited.c b/modules/audio_filter/resampler/bandlimited.c
index 485f320..b8aa475 100644
--- a/modules/audio_filter/resampler/bandlimited.c
+++ b/modules/audio_filter/resampler/bandlimited.c
@@ -83,7 +83,7 @@ struct filter_sys_t
unsigned int i_remainder; /* remainder of previous sample */
- audio_date_t end_date;
+ date_t end_date;
bool b_first;
bool b_filter2;
@@ -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_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 =
- aout_DateIncrement( &p_sys->end_date,
- p_out_buf->i_nb_samples );
+ date_Increment( &p_sys->end_date,
+ 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;
@@ -238,8 +238,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
* everything. */
p_filter->b_continuity = true;
p_sys->i_remainder = 0;
- aout_DateInit( &p_sys->end_date, i_out_rate );
- aout_DateSet( &p_sys->end_date, p_in_buf->start_date );
+ date_Init( &p_sys->end_date, i_out_rate, 1 );
+ date_Set( &p_sys->end_date, p_in_buf->start_date );
p_sys->i_old_rate = p_filter->input.i_rate;
p_sys->d_old_factor = 1;
p_sys->i_old_wing = 0;
@@ -454,9 +454,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Finalize aout buffer */
p_out_buf->i_nb_samples = i_out;
- p_out_buf->start_date = aout_DateGet( &p_sys->end_date );
- p_out_buf->end_date = aout_DateIncrement( &p_sys->end_date,
- p_out_buf->i_nb_samples );
+ p_out_buf->start_date = date_Get( &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_bytes = p_out_buf->i_nb_samples *
i_nb_channels * sizeof(int32_t);
diff --git a/modules/audio_filter/resampler/linear.c b/modules/audio_filter/resampler/linear.c
index 41be20b..5dfd10d 100644
--- a/modules/audio_filter/resampler/linear.c
+++ b/modules/audio_filter/resampler/linear.c
@@ -57,7 +57,7 @@ struct filter_sys_t
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 )
free( p_sys );
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;
@@ -170,7 +170,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
p_filter->b_continuity = true;
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
{
@@ -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;
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_bytes = p_out_buf->i_nb_samples *
@@ -265,7 +265,7 @@ static int OpenFilter( vlc_object_t *p_this )
free( p_sys );
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;
More information about the vlc-devel
mailing list