mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix soundcard usage optimization for iOS: after a conference call the AudioUnit wasn't released, which was causing next call to have no audio.
This commit is contained in:
parent
cda7797ba6
commit
bb0d2409bd
3 changed files with 10 additions and 1 deletions
|
|
@ -685,9 +685,12 @@ void LocalConference::onCallTerminating (LinphoneCall *call) {
|
|||
ms_message("conference_check_uninit(): size=%i", getSize());
|
||||
if ((remote_count == 1) && !m_terminating)
|
||||
convertConferenceToCall();
|
||||
|
||||
if (remote_count == 0) {
|
||||
if (m_localParticipantStream)
|
||||
if (m_localParticipantStream){
|
||||
removeLocalEndpoint();
|
||||
linphone_core_soundcard_hint_check(m_core);
|
||||
}
|
||||
if (m_recordEndpoint) {
|
||||
ms_audio_conference_remove_member(m_conf, m_recordEndpoint);
|
||||
ms_audio_endpoint_destroy(m_recordEndpoint);
|
||||
|
|
|
|||
|
|
@ -6225,6 +6225,7 @@ int linphone_core_get_calls_nb(const LinphoneCore *lc) {
|
|||
return (int)L_GET_CPP_PTR_FROM_C_OBJECT(lc)->getCallCount();
|
||||
}
|
||||
|
||||
|
||||
void linphone_core_soundcard_hint_check(LinphoneCore* lc) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(lc)->soundcardHintCheck();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
// TODO: Remove me later.
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
#include "conference_private.h"
|
||||
|
||||
#include <mediastreamer2/msvolume.h>
|
||||
|
||||
|
|
@ -301,6 +302,10 @@ void Core::soundcardHintCheck () {
|
|||
LinphoneConfig *config = linphone_core_get_config(L_GET_C_BACK_PTR(this));
|
||||
bool useRtpIo = !!lp_config_get_int(config, "sound", "rtp_io", FALSE);
|
||||
bool useRtpIoEnableLocalOutput = !!lp_config_get_int(config, "sound", "rtp_io_enable_local_output", FALSE);
|
||||
|
||||
LinphoneConference *conf_ctx = getCCore()->conf_ctx;
|
||||
if (conf_ctx && linphone_conference_get_size(conf_ctx) >= 1) return;
|
||||
|
||||
bool useFiles = L_GET_C_BACK_PTR(getSharedFromThis())->use_files;
|
||||
if ((!d->hasCalls() || noNeedForSound)
|
||||
&& (!useFiles && (!useRtpIo || (useRtpIo && useRtpIoEnableLocalOutput)))) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue