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
24c46391
Commit
24c46391
authored
Oct 28, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spatializer: kill warnings and improve locality
parent
e26c3d8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
modules/audio_filter/spatializer/revmodel.cpp
modules/audio_filter/spatializer/revmodel.cpp
+6
-9
No files found.
modules/audio_filter/spatializer/revmodel.cpp
View file @
24c46391
...
@@ -87,7 +87,7 @@ void revmodel::mute()
...
@@ -87,7 +87,7 @@ void revmodel::mute()
* /param long numsamples number of samples to be processed
* /param long numsamples number of samples to be processed
* /param int skip number of channels in the audio stream
* /param int skip number of channels in the audio stream
*****************************************************************************/
*****************************************************************************/
void
revmodel
::
processreplace
(
float
*
inputL
,
float
*
outputL
,
long
numsamples
,
int
skip
)
void
revmodel
::
processreplace
(
float
*
inputL
,
float
*
outputL
,
long
/* numsamples */
,
int
skip
)
{
{
float
outL
,
outR
,
input
;
float
outL
,
outR
,
input
;
float
inputR
;
float
inputR
;
...
@@ -121,11 +121,10 @@ void revmodel::processreplace(float *inputL, float *outputL, long numsamples, in
...
@@ -121,11 +121,10 @@ void revmodel::processreplace(float *inputL, float *outputL, long numsamples, in
outputL
[
1
]
=
(
outR
*
wet1
+
outL
*
wet2
+
inputR
*
dry
);
outputL
[
1
]
=
(
outR
*
wet1
+
outL
*
wet2
+
inputR
*
dry
);
}
}
void
revmodel
::
processmix
(
float
*
inputL
,
float
*
outputL
,
long
numsamples
,
int
skip
)
void
revmodel
::
processmix
(
float
*
inputL
,
float
*
outputL
,
long
/* numsamples */
,
int
skip
)
{
{
float
outL
,
outR
,
input
;
float
outL
,
outR
,
input
;
float
inputR
;
float
inputR
;
int
i
;
outL
=
outR
=
0
;
outL
=
outR
=
0
;
if
(
skip
>
1
)
if
(
skip
>
1
)
...
@@ -135,14 +134,14 @@ void revmodel::processmix(float *inputL, float *outputL, long numsamples, int sk
...
@@ -135,14 +134,14 @@ void revmodel::processmix(float *inputL, float *outputL, long numsamples, int sk
input
=
(
inputL
[
0
]
+
inputR
)
*
gain
;
input
=
(
inputL
[
0
]
+
inputR
)
*
gain
;
// Accumulate comb filters in parallel
// Accumulate comb filters in parallel
for
(
i
=
0
;
i
<
numcombs
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
numcombs
;
i
++
)
{
{
outL
+=
combL
[
i
].
process
(
input
);
outL
+=
combL
[
i
].
process
(
input
);
outR
+=
combR
[
i
].
process
(
input
);
outR
+=
combR
[
i
].
process
(
input
);
}
}
// Feed through allpasses in series
// Feed through allpasses in series
for
(
i
=
0
;
i
<
numallpasses
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
numallpasses
;
i
++
)
{
{
outL
=
allpassL
[
i
].
process
(
outL
);
outL
=
allpassL
[
i
].
process
(
outL
);
outR
=
allpassR
[
i
].
process
(
outR
);
outR
=
allpassR
[
i
].
process
(
outR
);
...
@@ -158,8 +157,6 @@ void revmodel::update()
...
@@ -158,8 +157,6 @@ void revmodel::update()
{
{
// Recalculate internal values after parameter change
// Recalculate internal values after parameter change
int
i
;
wet1
=
wet
*
(
width
/
2
+
0.5
f
);
wet1
=
wet
*
(
width
/
2
+
0.5
f
);
wet2
=
wet
*
((
1
-
width
)
/
2
);
wet2
=
wet
*
((
1
-
width
)
/
2
);
...
@@ -176,13 +173,13 @@ void revmodel::update()
...
@@ -176,13 +173,13 @@ void revmodel::update()
gain
=
fixedgain
;
gain
=
fixedgain
;
}
}
for
(
i
=
0
;
i
<
numcombs
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
numcombs
;
i
++
)
{
{
combL
[
i
].
setfeedback
(
roomsize1
);
combL
[
i
].
setfeedback
(
roomsize1
);
combR
[
i
].
setfeedback
(
roomsize1
);
combR
[
i
].
setfeedback
(
roomsize1
);
}
}
for
(
i
=
0
;
i
<
numcombs
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
numcombs
;
i
++
)
{
{
combL
[
i
].
setdamp
(
damp1
);
combL
[
i
].
setdamp
(
damp1
);
combR
[
i
].
setdamp
(
damp1
);
combR
[
i
].
setdamp
(
damp1
);
...
...
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