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
e991ef5d
Commit
e991ef5d
authored
Sep 17, 2008
by
Geoffroy Couprie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Should remove the big white noise that was produced
parent
43ffaaf1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
17 deletions
+42
-17
modules/audio_filter/spatializer/comb.hpp
modules/audio_filter/spatializer/comb.hpp
+8
-9
modules/audio_filter/spatializer/revmodel.cpp
modules/audio_filter/spatializer/revmodel.cpp
+8
-0
modules/audio_filter/spatializer/spatializer.cpp
modules/audio_filter/spatializer/spatializer.cpp
+26
-8
No files found.
modules/audio_filter/spatializer/comb.hpp
View file @
e991ef5d
...
...
@@ -9,6 +9,10 @@
#include "denormals.h"
/**
* Combination filter
*Takes multiple audio channels and mix them for one ear
*/
class
comb
{
public:
...
...
@@ -35,25 +39,20 @@ private:
inline
float
comb
::
process
(
float
input
)
{
#if 1
/* FIXME FIXME FIXME
* comb::process is completly broken so ignore it for now */
return
0.0
;
#else
/* FIXME
* comb::process is not really ear-friendly the tunning values must
* be changed*/
float
output
;
output
=
undenormalise
(
buffer
[
bufidx
]
);
filterstore
=
undenormalise
(
output
*
damp2
+
filterstore
*
damp1
);
filterstore
=
undenormalise
(
output
*
damp2
);
buffer
[
bufidx
]
=
input
+
filterstore
*
feedback
;
if
(
++
bufidx
>=
bufsize
)
bufidx
=
0
;
return
output
;
#endif
}
#endif //_comb_
...
...
modules/audio_filter/spatializer/revmodel.cpp
View file @
e991ef5d
...
...
@@ -80,6 +80,13 @@ void revmodel::mute()
}
}
/*****************************************************************************
* Transforms the audio stream
* /param float *inputL input buffer
* /param float *outputL output buffer
* /param long numsamples number of samples to be processed
* /param int skip number of channels in the audio stream
*****************************************************************************/
void
revmodel
::
processreplace
(
float
*
inputL
,
float
*
outputL
,
long
numsamples
,
int
skip
)
{
float
outL
,
outR
,
input
;
...
...
@@ -87,6 +94,7 @@ void revmodel::processreplace(float *inputL, float *outputL, long numsamples, in
int
i
;
outL
=
outR
=
0
;
/* TODO this module supports only 2 audio channels, let's improve this */
if
(
skip
>
1
)
inputR
=
inputL
[
1
];
else
...
...
modules/audio_filter/spatializer/spatializer.cpp
View file @
e991ef5d
/*****************************************************************************
* spatializer.cpp:
* spatializer.cpp:
sound reverberation
*****************************************************************************
* Copyright (C) 2004, 2006, 2007 the VideoLAN team
*
...
...
@@ -45,6 +45,22 @@
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
#define ROOMSIZE_TEXT N_("Room size")
#define ROOMSIZE_LONGTEXT N_("Defines the virtual surface of the room" \
"emulated by the filter." )
#define WIDTH_TEXT N_("Room width")
#define WIDTH_LONGTEXT N_("Width of the virtual room")
#define WET_TEXT N_("")
#define WET_LONGTEXT N_("")
#define DRY_TEXT N_("")
#define DRY_LONGTEXT N_("")
#define DAMP_TEXT N_("")
#define DAMP_LONGTEXT N_("")
vlc_module_begin
();
set_description
(
N_
(
"spatializer"
)
);
set_shortname
(
N_
(
"spatializer"
)
);
...
...
@@ -54,11 +70,11 @@ vlc_module_begin();
set_callbacks
(
Open
,
Close
);
add_shortcut
(
"spatializer"
);
add_float
(
"Roomsize"
,
1.05
,
NULL
,
NULL
,
NULL
,
true
);
add_float
(
"Width"
,
10.0
,
NULL
,
NULL
,
NULL
,
true
);
add_float
(
"Wet"
,
3.0
,
NULL
,
NULL
,
NULL
,
true
);
add_float
(
"Dry"
,
2.0
,
NULL
,
NULL
,
NULL
,
true
);
add_float
(
"Damp"
,
1.0
,
NULL
,
NULL
,
NULL
,
true
);
add_float
(
"Roomsize"
,
1.05
,
NULL
,
ROOMSIZE_TEXT
,
ROOMSIZE_LONGTEXT
,
true
);
add_float
(
"Width"
,
10.0
,
NULL
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
true
);
add_float
(
"Wet"
,
3.0
,
NULL
,
WET_TEXT
,
WET_LONGTEXT
,
true
);
add_float
(
"Dry"
,
2.0
,
NULL
,
DRY_TEXT
,
DRY_LONGTEXT
,
true
);
add_float
(
"Damp"
,
1.0
,
NULL
,
DAMP_TEXT
,
DAMP_LONGTEXT
,
true
);
vlc_module_end
();
/*****************************************************************************
...
...
@@ -173,8 +189,6 @@ static void Close( vlc_object_t *p_this )
/*****************************************************************************
* DoWork: process samples buffer
*****************************************************************************
*
*****************************************************************************/
static
void
DoWork
(
aout_instance_t
*
p_aout
,
aout_filter_t
*
p_filter
,
aout_buffer_t
*
p_in_buf
,
aout_buffer_t
*
p_out_buf
)
...
...
@@ -255,6 +269,10 @@ static void SpatClean( aout_filter_t *p_filter )
var_DelCallback
(
p_aout
,
psz_control_names
[
4
],
DampCallback
,
p_sys
);
}
/*****************************************************************************
* Variables callbacks
*****************************************************************************/
static
int
RoomCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
...
...
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