...
 
Commits (1)
......@@ -3999,6 +3999,10 @@ LinphoneStatus linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call
return linphone_call_terminate(call);
}
void linphone_core_reset_sound_card(LinphoneCore *lc) {
return L_GET_CPP_PTR_FROM_C_OBJECT(lc)->resetSoundCard();
}
LinphoneStatus linphone_core_terminate_all_calls(LinphoneCore *lc) {
return L_GET_CPP_PTR_FROM_C_OBJECT(lc)->terminateAllCalls();
}
......
......@@ -1375,6 +1375,11 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_decline_call(Li
**/
LINPHONE_PUBLIC LinphoneStatus linphone_core_terminate_all_calls(LinphoneCore *lc);
/**
* reset the sound card.
* @param[in] lc #LinphoneCore object
**/
LINPHONE_PUBLIC void linphone_core_reset_sound_card(LinphoneCore *lc);
/**
* @brief Pauses the call. If a music file has been setup using linphone_core_set_play_file(),
* this file will be played to the remote user.
......
......@@ -306,11 +306,16 @@ void Core::soundcardHintCheck () {
if ((!d->hasCalls() || noNeedForSound)
&& (!L_GET_C_BACK_PTR(getSharedFromThis())->use_files && (!useRtpIo || (useRtpIo && useRtpIoEnableLocalOutput)))) {
lInfo() << "Notifying soundcard that we don't need it anymore for calls";
d->notifySoundcardUsage(false);
resetSoundCard();
}
}
void Core::resetSoundCard () {
L_D();
lInfo() << "Notifying soundcard that we don't need it anymore for calls";
d->notifySoundcardUsage(false);
}
LinphoneStatus Core::terminateAllCalls () {
L_D();
while (!d->calls.empty()) {
......
......@@ -100,6 +100,7 @@ public:
LinphoneStatus pauseAllCalls ();
void soundcardHintCheck ();
LinphoneStatus terminateAllCalls ();
void resetSoundCard ();
// ---------------------------------------------------------------------------
// ChatRoom.
......