Commit 3b390294 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#1966] Remove mutex from

Ringbuffer are lockfree data structures...
parent 0b0af87e
......@@ -36,7 +36,7 @@ MainBuffer::~MainBuffer()
void MainBuffer::setInternalSamplingRate (int sr)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
if (sr != _internalSamplingRate) {
......@@ -162,7 +162,7 @@ bool MainBuffer::removeRingBuffer (CallID call_id)
void MainBuffer::bindCallID (CallID call_id1, CallID call_id2)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
RingBuffer* ring_buffer;
CallIDSet* callid_set;
......@@ -193,7 +193,7 @@ void MainBuffer::bindCallID (CallID call_id1, CallID call_id2)
void MainBuffer::unBindCallID (CallID call_id1, CallID call_id2)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
removeCallIDfromSet (call_id1, call_id2);
removeCallIDfromSet (call_id2, call_id1);
......@@ -230,7 +230,7 @@ void MainBuffer::unBindCallID (CallID call_id1, CallID call_id2)
void MainBuffer::unBindAll (CallID call_id)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
CallIDSet* callid_set = getCallIDSet (call_id);
......@@ -257,7 +257,7 @@ void MainBuffer::unBindAll (CallID call_id)
int MainBuffer::putData (void *buffer, int toCopy, unsigned short volume, CallID call_id)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
RingBuffer* ring_buffer = getRingBuffer (call_id);
......@@ -284,7 +284,7 @@ int MainBuffer::putData (void *buffer, int toCopy, unsigned short volume, CallID
int MainBuffer::availForPut (CallID call_id)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
RingBuffer* ringbuffer = getRingBuffer (call_id);
......@@ -298,7 +298,7 @@ int MainBuffer::availForPut (CallID call_id)
int MainBuffer::getData (void *buffer, int toCopy, unsigned short volume, CallID call_id)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
CallIDSet* callid_set = getCallIDSet (call_id);
......@@ -363,7 +363,7 @@ int MainBuffer::getDataByID (void *buffer, int toCopy, unsigned short volume, Ca
int MainBuffer::availForGet (CallID call_id)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
CallIDSet* callid_set = getCallIDSet (call_id);
......@@ -425,7 +425,7 @@ int MainBuffer::discard (int toDiscard, CallID call_id)
{
// _debug("MainBuffer::discard");
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
CallIDSet* callid_set = getCallIDSet (call_id);
......@@ -474,7 +474,7 @@ int MainBuffer::discardByID (int toDiscard, CallID call_id, CallID reader_id)
void MainBuffer::flush (CallID call_id)
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
CallIDSet* callid_set = getCallIDSet (call_id);
......@@ -501,7 +501,7 @@ void MainBuffer::flush (CallID call_id)
void MainBuffer::flushDefault()
{
ost::MutexLock guard (_mutex);
// ost::MutexLock guard (_mutex);
flushByID (default_id, default_id);
......
......@@ -106,7 +106,7 @@ public:
SFLDataFormat* mixBuffer;
ost::Mutex _mutex;
// ost::Mutex _mutex;
int _internalSamplingRate;
......
......@@ -1332,6 +1332,7 @@ void ManagerImpl::joinConference (const CallID& conf_id1,
}
void ManagerImpl::addStream (const CallID& call_id) {
_debug ("Manager: Add audio stream %s", call_id.c_str());
AccountID currentAccountId;
......
Supports Markdown
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