Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
320b0b6c
Commit
320b0b6c
authored
Apr 15, 2016
by
François Grisez
Browse files
Use ms_parse_equalizer_string() to parse the strings provided by the gain linphonerc parameter
parent
c703de1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecall.c
View file @
320b0b6c
...
...
@@ -2689,15 +2689,16 @@ static void parametrize_equalizer(LinphoneCore *lc, AudioStream *st){
ms_filter_call_method
(
f
,
MS_EQUALIZER_SET_ACTIVE
,
&
enabled
);
if
(
enabled
){
if
(
gains
){
do
{
int
bytes
;
MSEqualizerGain
g
;
if
(
sscanf
(
gains
,
"%f:%f:%f %n"
,
&
g
.
frequency
,
&
g
.
gain
,
&
g
.
width
,
&
bytes
)
==
3
){
ms_message
(
"Read equalizer gains: %f(~%f) --> %f"
,
g
.
frequency
,
g
.
width
,
g
.
gain
);
ms_filter_call_method
(
f
,
MS_EQUALIZER_SET_GAIN
,
&
g
);
gains
+=
bytes
;
}
else
break
;
}
while
(
1
);
MSList
*
gains_list
=
ms_parse_equalizer_string
(
gains
);
if
(
gains_list
)
{
MSList
*
it
;
for
(
it
=
gains_list
;
it
;
it
=
it
->
next
)
{
MSEqualizerGain
*
g
=
(
MSEqualizerGain
*
)
it
->
data
;
ms_message
(
"Read equalizer gains: %f(~%f) --> %f"
,
g
->
frequency
,
g
->
width
,
g
->
gain
);
ms_filter_call_method
(
f
,
MS_EQUALIZER_SET_GAIN
,
g
);
}
ms_list_free_with_data
(
gains_list
,
ms_free
);
}
}
}
}
...
...
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