From 6ed82cb740677f08d1010c38fd44747b3dae9b93 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Mon, 18 Aug 2014 19:02:31 +0200 Subject: [PATCH] Add the equalizer location parameter to the "sound" section of lpconfig. Setting it to "mic" will place it in the input graph, rather than the default location in output graph. This allow to pre-amplify some frequencies in the input device. You still need to eq_active=1 and set eq_gains to what you want to amplify. --- coreapi/linphonecall.c | 7 +++++++ mediastreamer2 | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 37a1079a3..273990742 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1710,6 +1710,13 @@ void linphone_call_init_audio_stream(LinphoneCall *call){ else if (strcasecmp(type,"full")==0) audio_stream_enable_echo_limiter(audiostream,ELControlFull); } + + /* equalizer location in the graph: 'mic' = in input graph, otherwise in output graph. + Any other value than mic will default to output graph for compatibility */ + const char *location = lp_config_get_string(lc->config,"sound","eq_location","hp"); + audiostream->eq_loc = (strcasecmp(location,"mic") == 0) ? MSEqualizerMic : MSEqualizerHP; + ms_error("Equalizer location: %s", location); + audio_stream_enable_gain_control(audiostream,TRUE); if (linphone_core_echo_cancellation_enabled(lc)){ int len,delay,framesize; diff --git a/mediastreamer2 b/mediastreamer2 index a1c7195ff..b1b9fc244 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit a1c7195ff8372ac1b77d71dce52c2d9da0173cc6 +Subproject commit b1b9fc244915ecccbba26db9440b077d5cafa85f