Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
mediastreamer2
Commits
0cace53f
Commit
0cace53f
authored
Jan 04, 2011
by
Simon Morlat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanups
parent
e5685e48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
src/Makefile.am
src/Makefile.am
+4
-3
src/msvolume.c
src/msvolume.c
+3
-5
No files found.
src/Makefile.am
View file @
0cace53f
...
...
@@ -174,10 +174,11 @@ libmediastreamer_la_LIBADD= $(ORTP_LIBS) \
$(GSM_LIBS)
\
$(LIBV4L1_LIBS)
\
$(LIBV4L2_LIBS)
libmediastreamer_la_LDFLAGS
=
-no-undefined
-version-info
$(LIBMEDIASTREAMER_SO_VERSION)
if
!BUILD_WIN32
libmediastreamer_la_LDFLAGS
=
-rdynamic
else
libmediastreamer_la_LDFLAGS
=
-no-undefined
libmediastreamer_la_LDFLAGS
+=
-rdynamic
endif
if
BUILD_VIDEO
...
...
src/msvolume.c
View file @
0cace53f
...
...
@@ -63,7 +63,6 @@ typedef struct Volume{
float
ng_floorgain
;
float
ng_gain
;
MSBufferizer
*
buffer
;
bool_t
ea_active
;
bool_t
agc_enabled
;
bool_t
noise_gate_enabled
;
bool_t
remove_dc
;
...
...
@@ -75,7 +74,6 @@ static void volume_init(MSFilter *f){
v
->
level_pk
=
0
;
v
->
static_gain
=
v
->
gain
=
v
->
target_gain
=
1
;
v
->
dc_offset
=
0
;
v
->
ea_active
=
FALSE
;
v
->
vol_upramp
=
vol_upramp
;
v
->
vol_downramp
=
vol_downramp
;
v
->
ea_thres
=
noise_thres
;
...
...
@@ -187,8 +185,8 @@ static float volume_echo_avoider_process(Volume *v, mblk_t *om) {
v
->
target_gain
=
v
->
static_gain
;
}
if
(
!
(
++
counter
%
20
))
ms_message
(
"
ea_active=%i,
peer_e=%f, target_g=%f, gain=%f"
,
v
->
ea_active
,
peer_e
,
v
->
target_gain
,
v
->
gain
);
ms_message
(
"
volume_echo_avoider_process():
peer_e=%f, target_g=%f, gain=%f"
,
peer_e
,
v
->
target_gain
,
v
->
gain
);
return
v
->
target_gain
;
}
...
...
@@ -210,7 +208,7 @@ static void volume_noise_gate_process(Volume *v , float energy, mblk_t *om){
/* of gain - ears impression */
v
->
ng_gain
=
v
->
ng_gain
*
0
.
75
+
tgain
*
0
.
25
;
if
(
!
(
++
counter
%
10
))
ms_message
(
"%d:nglevel=%f, energy=%f, tgain=%f, ng_gain=%f"
,
ms_message
(
"%d:
nglevel=%f, energy=%f, tgain=%f, ng_gain=%f"
,
(
v
->
peer
!=
NULL
)
?
1
:
0
,
energy
,
v
->
energy
,
tgain
,
v
->
ng_gain
);
}
...
...
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