diff --git a/src/channel.cpp b/src/channel.cpp index 389bb23b..c5e7defd 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -225,22 +225,12 @@ CChannel::CChannel () void CChannel::SetSockBufSize ( const int iNewBlockSize, const int iNumBlocks ) { - /* this opperation must be done with mutex */ - -qDebug ( "before lock" ); - + /* this opperation must be done with mutex */ Mutex.lock (); SockBuf.Init ( iNewBlockSize, iNumBlocks ); - -qDebug ( "in lock" ); - Mutex.unlock (); - - -qDebug ( "after lock" ); - } void CChannel::OnJittBufSizeChange ( int iNewJitBufSize ) @@ -267,8 +257,6 @@ bool CChannel::PutData ( const CVector& vecbyData, { bool bRet = true; - Mutex.lock (); /* put mutex lock */ - /* only process if packet has correct size */ if ( iNumBytes == iAudComprSize ) { @@ -291,7 +279,11 @@ for (int i = 0; i < BLOCK_SIZE_SAMPLES; i++) vecdResOutData[i] = (double) vecsDecomprAudio[i]; + Mutex.lock (); /* put mutex lock */ + bRet = SockBuf.Put ( vecdResOutData ); + + Mutex.unlock (); /* put mutex unlock */ /* reset time-out counter */ iConTimeOut = CON_TIME_OUT_CNT_MAX; @@ -305,8 +297,6 @@ for (int i = 0; i < BLOCK_SIZE_SAMPLES; i++) bRet = Protocol.ParseMessage ( vecbyData, iNumBytes ); } - Mutex.unlock (); /* put mutex unlock */ - return bRet; }