Commit 320b0b6c authored by François Grisez's avatar François Grisez
Browse files

Use ms_parse_equalizer_string() to parse the strings provided by the gain linphonerc parameter

parent c703de1e
......@@ -2689,15 +2689,16 @@ static void parametrize_equalizer(LinphoneCore *lc, AudioStream *st){
if (enabled){
if (gains){
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);
}else break;
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment