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
c2c47bc1
Commit
c2c47bc1
authored
Apr 19, 2016
by
François Grisez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Last fixes for per-device equalization preset on Android
parent
854b25bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
audiostream.c
src/voip/audiostream.c
+6
-6
No files found.
src/voip/audiostream.c
View file @
c2c47bc1
...
...
@@ -1053,12 +1053,12 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
if
(
device
&&
device
->
hacks
)
{
const
char
*
gains
;
gains
=
device
->
hacks
->
mic_equalizer
;
if
(
gains
)
{
if
(
gains
&&
stream
->
mic_equalizer
)
{
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
++
)
{
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
(
stream
->
mic_equalizer
,
MS_EQUALIZER_SET_GAIN
,
g
);
...
...
@@ -1067,15 +1067,15 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
}
}
gains
=
device
->
hacks
->
spk_equalizer
;
if
(
gains
)
{
if
(
gains
&&
stream
->
spk_equalizer
)
{
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
++
)
{
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
(
stream
->
mic
_equalizer
,
MS_EQUALIZER_SET_GAIN
,
g
);
ms_filter_call_method
(
stream
->
spk
_equalizer
,
MS_EQUALIZER_SET_GAIN
,
g
);
}
ms_list_free_with_data
(
gains_list
,
ms_free
);
}
...
...
@@ -1789,7 +1789,7 @@ void audio_stream_set_spk_gain_db(AudioStream *stream, float gain_db) {
#endif
if
(
stream
->
volrecv
){
ms_filter_call_method
(
stream
->
vol
send
,
MS_VOLUME_SET_DB_GAIN
,
&
gain
);
ms_filter_call_method
(
stream
->
vol
recv
,
MS_VOLUME_SET_DB_GAIN
,
&
gain
);
}
else
ms_warning
(
"Could not apply gain on received RTP packet: gain control wasn't activated. "
"Use audio_stream_enable_gain_control() before starting the stream."
);
}
...
...
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