diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 393f405ea..d5a09b404 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1829,6 +1829,25 @@ int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs){ return 0; } +/** + * Enable RFC3389 generic confort noise algorithm (CN payload type). + * It is disabled by default, because this algorithm is only relevant for legacy codecs (PCMU, PCMA, G722). + * @param lc the LinphoneCore + * @param enabled TRUE if enabled, FALSE otherwise. +**/ +void linphone_core_enable_generic_confort_noise(LinphoneCore *lc, bool_t enabled){ + lp_config_set_int(lc->config, "misc", "use_cn", enabled); +} + +/** + * Returns enablement of RFC3389 generic confort noise algorithm. + * @param lc the LinphoneCore + * @return TRUE or FALSE. +**/ +bool_t linphone_core_generic_confort_noise_enabled(const LinphoneCore *lc){ + return lp_config_get_int(lc->config, "misc", "use_cn", FALSE); +} + const MSList * linphone_core_get_friend_list(const LinphoneCore *lc) { return lc->friends; diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index f7d8af700..8297eb61e 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -2278,6 +2278,10 @@ LINPHONE_PUBLIC const MSList *linphone_core_get_video_codecs(const LinphoneCore LINPHONE_PUBLIC int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs); +LINPHONE_PUBLIC void linphone_core_enable_generic_confort_noise(LinphoneCore *lc, bool_t enabled); + +LINPHONE_PUBLIC bool_t linphone_core_generic_confort_noise_enabled(const LinphoneCore *lc); + /** * Tells whether the specified payload type is enabled. * @param[in] lc #LinphoneCore object. diff --git a/mediastreamer2 b/mediastreamer2 index cf926c312..5ae1633ed 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit cf926c3127bec00dde2bcabef9c1591cd39a6c8f +Subproject commit 5ae1633ed1a025f40e3887950524663b892251e4 diff --git a/tester/call_tester.c b/tester/call_tester.c index 5103ea15e..50d0032f6 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -25,7 +25,7 @@ #include "lpconfig.h" #include "private.h" #include "liblinphone_tester.h" -#include "mediastreamer2/dsptools.h" +#include "mediastreamer2/msutils.h" #include "belle-sip/sipstack.h" #ifdef WIN32