Sound settings not applied until restarting app

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sound settings not applied until restarting app

Stefan Oud
Dear developers,

I want to change the audio settings with the linphone configuration.
When I do for example:
- lc.getConfig().setFloat("sound", "my_key", new_key);
- applied_key = lc.getConfig().getFloat("sound", "my_key", -1);
I can read back the new data, but the settings in the linphone core, for example:
float applied_key = lp_config_get_float(config, "sound", "my_key", -1);
Will not get updated until I restart the app.
Is there a way to apply the changes after setting the value in the preferences?
I know that the linphone version in the app store can change the microphone gain without needing restart.
When I set "mic_gain_db" with lc.getConfig().setFloat, it still requires a restart before taking effect (also for other keys).
The same holds for LinphonePreferences.instantce().getConfig()
How can I update the settings correctly?
Best regards,

Stefan Oud.

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Sound settings not applied until restarting app

Sylvain Berfini

Hi,

Indeed if you make changes to the config directly it won't be applied until the next restart as we only read config file when the Core starts.

If you want changes to be applied directly, use 

linphone_core_set_mic_gain_db

or any Core method. It will apply the new value directly and update the configuration file at the same time.

Cheers,


Le 22/07/2019 à 08:00, Stefan Oud a écrit :
Dear developers,

I want to change the audio settings with the linphone configuration.
When I do for example:
- lc.getConfig().setFloat("sound", "my_key", new_key);
- applied_key = lc.getConfig().getFloat("sound", "my_key", -1);
I can read back the new data, but the settings in the linphone core, for example:
float applied_key = lp_config_get_float(config, "sound", "my_key", -1);
Will not get updated until I restart the app.
Is there a way to apply the changes after setting the value in the preferences?
I know that the linphone version in the app store can change the microphone gain without needing restart.
When I set "mic_gain_db" with lc.getConfig().setFloat, it still requires a restart before taking effect (also for other keys).
The same holds for LinphonePreferences.instantce().getConfig()
How can I update the settings correctly?
Best regards,

Stefan Oud.


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers