Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
c58b24c5
Commit
c58b24c5
authored
Aug 13, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used date_t instead of audio_date_t in audio filters.
parent
c09763be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
modules/audio_filter/resampler/bandlimited.c
modules/audio_filter/resampler/bandlimited.c
+9
-9
modules/audio_filter/resampler/linear.c
modules/audio_filter/resampler/linear.c
+7
-7
No files found.
modules/audio_filter/resampler/bandlimited.c
View file @
c58b24c5
...
...
@@ -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_Date
Get
(
&
p_sys
->
end_date
);
p_out_buf
->
start_date
=
date_
Get
(
&
p_sys
->
end_date
);
p_out_buf
->
end_date
=
aout_Date
Increment
(
&
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_Date
Set
(
&
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_Date
Get
(
&
p_sys
->
end_date
);
p_out_buf
->
end_date
=
aout_Date
Increment
(
&
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
);
...
...
modules/audio_filter/resampler/linear.c
View file @
c58b24c5
...
...
@@ -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_Date
Get
(
&
p_sys
->
end_date
)
)
date_
Get
(
&
p_sys
->
end_date
)
)
{
aout_Date
Set
(
&
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_Date
Increment
(
&
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment