Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1e686fd2
Commit
1e686fd2
authored
Feb 15, 2008
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync with trunk.
parent
6ae7bd00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
modules/audio_filter/resampler/linear.c
modules/audio_filter/resampler/linear.c
+10
-8
No files found.
modules/audio_filter/resampler/linear.c
View file @
1e686fd2
...
...
@@ -2,7 +2,7 @@
* linear.c : linear interpolation resampler
*****************************************************************************
* Copyright (C) 2002, 2006 the VideoLAN team
* $Id$
* $Id
: 72cebf385e30a02f5e5b7803ad0aa2a4f12c424d
$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal Helberg <dnumgis@videolan.org>
...
...
@@ -81,7 +81,7 @@ static int Create( vlc_object_t *p_this )
{
aout_filter_t
*
p_filter
=
(
aout_filter_t
*
)
p_this
;
struct
filter_sys_t
*
p_sys
;
if
(
p_filter
->
input
.
i_rate
==
p_filter
->
output
.
i_rate
||
p_filter
->
input
.
i_format
!=
p_filter
->
output
.
i_format
||
p_filter
->
input
.
i_physical_channels
...
...
@@ -108,6 +108,7 @@ static int Create( vlc_object_t *p_this )
msg_Err
(
p_filter
,
"out of memory"
);
return
VLC_ENOMEM
;
}
aout_DateInit
(
&
p_sys
->
end_date
,
p_filter
->
output
.
i_rate
);
p_filter
->
pf_do_work
=
DoWork
;
...
...
@@ -125,7 +126,7 @@ static void Close( vlc_object_t * p_this )
{
aout_filter_t
*
p_filter
=
(
aout_filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
(
filter_sys_t
*
)
p_filter
->
p_sys
;
free
(
p_sys
->
p_prev_sample
);
free
(
p_sys
);
}
...
...
@@ -268,7 +269,7 @@ static int OpenFilter( vlc_object_t *p_this )
{
return
VLC_EGENERIC
;
}
/* Allocate the memory needed to store the module's structure */
p_filter
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
struct
filter_sys_t
)
);
if
(
p_sys
==
NULL
)
...
...
@@ -285,6 +286,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
);
p_filter
->
pf_audio_filter
=
Resample
;
...
...
@@ -328,11 +330,11 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
if
(
p_block
)
p_block
->
pf_release
(
p_block
);
return
NULL
;
}
i_bytes_per_frame
=
p_filter
->
fmt_out
.
audio
.
i_channels
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
/
8
;
i_out_size
=
i_bytes_per_frame
*
(
1
+
(
p_block
->
i_samples
*
i_out_size
=
i_bytes_per_frame
*
(
1
+
(
p_block
->
i_samples
*
p_filter
->
fmt_out
.
audio
.
i_rate
/
p_filter
->
fmt_in
.
audio
.
i_rate
));
p_out
=
p_filter
->
pf_audio_buffer_new
(
p_filter
,
i_out_size
);
...
...
@@ -363,7 +365,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
p_block
->
pf_release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
...
...
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