From efed1dc6bb4178f45a3c2a0ed98e92d83c030bb5 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
Date: Fri, 17 Sep 2010 17:57:52 -0400
Subject: [PATCH] [#4078] Add audio layer mutex in iax in case internal audio
 sampling rate is changed

---
 sflphone-common/src/iax/iaxvoiplink.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sflphone-common/src/iax/iaxvoiplink.cpp b/sflphone-common/src/iax/iaxvoiplink.cpp
index eee6c4c658..abc93f36c1 100644
--- a/sflphone-common/src/iax/iaxvoiplink.cpp
+++ b/sflphone-common/src/iax/iaxvoiplink.cpp
@@ -245,6 +245,8 @@ IAXVoIPLink::getEvent()
 {
     IAXCall* call = NULL;
 
+    Manager::instance().getAudioLayerMutex()->enter();
+
     // lock iax_ stuff..
     _mutexIAX.enterMutex();
     iax_event* event = NULL;
@@ -280,6 +282,8 @@ IAXVoIPLink::getEvent()
 
     sendAudioFromMic();
 
+    Manager::instance().getAudioLayerMutex()->leave();
+
     // Do the doodle-moodle to send audio from the microphone to the IAX channel.
     // sendAudioFromMic();
 
-- 
GitLab