Commit cd860ed2 authored by DanmeiChen's avatar DanmeiChen
Browse files

add api configure audio session

parent 182f9edb
......@@ -7194,6 +7194,10 @@ void linphone_core_activate_audio_session (LinphoneCore* lc, bool_t actived) {
L_GET_CPP_PTR_FROM_C_OBJECT(lc)->soundcardActivateAudioSession(actived);
}
void linphone_core_configure_audio_session (LinphoneCore *lc) {
L_GET_CPP_PTR_FROM_C_OBJECT(lc)->soundcardConfigureAudioSession();
}
void linphone_core_enable_callkit (LinphoneCore *lc, bool_t enabled) {
L_GET_CPP_PTR_FROM_C_OBJECT(lc)->soundcardEnableCallkit(enabled);
linphone_config_set_int(lc->config, "app", "use_callkit", (int)enabled);
......
......@@ -138,6 +138,13 @@ LINPHONE_PUBLIC void linphone_core_stop_dtmf_stream(LinphoneCore* core);
*/
LINPHONE_PUBLIC void linphone_core_activate_audio_session(LinphoneCore* core, bool_t actived);
/**
* Special function to configure audio session with default settings. Must be called in ProviderDelegate's callbacks when answer an incoming call and start an outgoing call.
* @param core The #LinphoneCore object. @notnil
* @ingroup IOS
*/
LINPHONE_PUBLIC void linphone_core_configure_audio_session(LinphoneCore* core);
/**
* Special function to enable the callkit.
* @param core The #LinphoneCore object. @notnil
......
......@@ -269,6 +269,13 @@ void Core::soundcardActivateAudioSession (bool actived) {
}
}
void Core::soundcardConfigureAudioSession () {
MSSndCard *card = getCCore()->sound_conf.capt_sndcard;
if (card) {
ms_snd_card_configure_audio_session(card);
}
}
void Core::soundcardEnableCallkit (bool enabled) {
MSSndCard *card = getCCore()->sound_conf.capt_sndcard;
if (card) {
......
......@@ -124,6 +124,7 @@ public:
std::shared_ptr<Call> getCurrentCall () const;
LinphoneStatus pauseAllCalls ();
void soundcardActivateAudioSession (bool active);
void soundcardConfigureAudioSession ();
void soundcardEnableCallkit (bool enabled);
void soundcardAudioRouteChanged ();
LinphoneStatus terminateAllCalls ();
......
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