Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
854b25bc
Commit
854b25bc
authored
Apr 19, 2016
by
François Grisez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes C90 violation on Android
parent
e41cfff7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
29 deletions
+31
-29
audiostream.c
src/voip/audiostream.c
+31
-29
No files found.
src/voip/audiostream.c
View file @
854b25bc
...
...
@@ -1045,38 +1045,40 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
}
#ifdef ANDROID
/*configure equalizer if needed*/
audio_stream_set_mic_gain_db
(
stream
,
0
);
audio_stream_set_spk_gain_db
(
stream
,
0
);
SoundDeviceDescription
*
device
=
sound_device_description_get
();
if
(
device
&&
device
->
hacks
)
{
const
char
*
gains
;
gains
=
device
->
hacks
->
mic_equalizer
;
if
(
gains
)
{
MSList
*
gains_list
=
ms_parse_equalizer_string
(
gains
);
if
(
gains_list
)
{
MSList
*
it
;
ms_message
(
"Found equalizer configuration for the microphone in the devices table"
);
for
(
it
=
gains_list
;
it
;
it
++
)
{
MSEqualizerGain
*
g
=
(
MSEqualizerGain
*
)
it
->
data
;
ms_message
(
"Read equalizer gains: %f(~%f) --> %f"
,
g
->
frequency
,
g
->
width
,
g
->
gain
);
ms_filter_call_method
(
stream
->
mic_equalizer
,
MS_EQUALIZER_SET_GAIN
,
g
);
{
/*configure equalizer if needed*/
SoundDeviceDescription
*
device
=
sound_device_description_get
();
audio_stream_set_mic_gain_db
(
stream
,
0
);
audio_stream_set_spk_gain_db
(
stream
,
0
);
if
(
device
&&
device
->
hacks
)
{
const
char
*
gains
;
gains
=
device
->
hacks
->
mic_equalizer
;
if
(
gains
)
{
MSList
*
gains_list
=
ms_parse_equalizer_string
(
gains
);
if
(
gains_list
)
{
MSList
*
it
;
ms_message
(
"Found equalizer configuration for the microphone in the devices table"
);
for
(
it
=
gains_list
;
it
;
it
++
)
{
MSEqualizerGain
*
g
=
(
MSEqualizerGain
*
)
it
->
data
;
ms_message
(
"Read equalizer gains: %f(~%f) --> %f"
,
g
->
frequency
,
g
->
width
,
g
->
gain
);
ms_filter_call_method
(
stream
->
mic_equalizer
,
MS_EQUALIZER_SET_GAIN
,
g
);
}
ms_list_free_with_data
(
gains_list
,
ms_free
);
}
ms_list_free_with_data
(
gains_list
,
ms_free
);
}
}
gains
=
device
->
hacks
->
spk_equalizer
;
if
(
gains
)
{
MSList
*
gains_list
=
ms_parse_equalizer_string
(
gains
);
if
(
gains_list
)
{
MSList
*
it
;
ms_message
(
"Found equalizer configuration for the speakers in the devices table"
);
for
(
it
=
gains_list
;
it
;
it
++
)
{
MSEqualizerGain
*
g
=
(
MSEqualizerGain
*
)
it
->
data
;
ms_message
(
"Read equalizer gains: %f(~%f) --> %f"
,
g
->
frequency
,
g
->
width
,
g
->
gain
);
ms_filter_call_method
(
stream
->
mic_equalizer
,
MS_EQUALIZER_SET_GAIN
,
g
);
gains
=
device
->
hacks
->
spk_equalizer
;
if
(
gains
)
{
MSList
*
gains_list
=
ms_parse_equalizer_string
(
gains
);
if
(
gains_list
)
{
MSList
*
it
;
ms_message
(
"Found equalizer configuration for the speakers in the devices table"
);
for
(
it
=
gains_list
;
it
;
it
++
)
{
MSEqualizerGain
*
g
=
(
MSEqualizerGain
*
)
it
->
data
;
ms_message
(
"Read equalizer gains: %f(~%f) --> %f"
,
g
->
frequency
,
g
->
width
,
g
->
gain
);
ms_filter_call_method
(
stream
->
mic_equalizer
,
MS_EQUALIZER_SET_GAIN
,
g
);
}
ms_list_free_with_data
(
gains_list
,
ms_free
);
}
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