1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-19 16:15:49 -05:00

Audio input: removed mutex lock on write data. Audio output: removed mutex lock on read data

This commit is contained in:
f4exb 2016-12-25 20:04:19 +01:00
parent e05822ba02
commit 53f6413bd9
2 changed files with 189 additions and 187 deletions

View File

@ -155,10 +155,11 @@ qint64 AudioInput::readData(char* data, qint64 maxLen)
qint64 AudioInput::writeData(const char *data, qint64 len)
{
// @TODO: Study this mutex on OSX, for now deadlocks possible
#ifndef __APPLE__
QMutexLocker mutexLocker(&m_mutex);
#endif
// Study this mutex on OSX, for now deadlocks possible
// Removed as it may indeed cause lockups and is in fact useless.
//#ifndef __APPLE__
// QMutexLocker mutexLocker(&m_mutex);
//#endif
if ((m_audioFormat.sampleSize() != 16)
|| (m_audioFormat.sampleType() != QAudioFormat::SignedInt)

View File

@ -158,10 +158,11 @@ qint64 AudioOutput::readData(char* data, qint64 maxLen)
{
//qDebug("AudioOutput::readData: %lld", maxLen);
// @TODO: Study this mutex on OSX, for now deadlocks possible
#ifndef __APPLE__
QMutexLocker mutexLocker(&m_mutex);
#endif
// Study this mutex on OSX, for now deadlocks possible
// Removed as it may indeed cause lockups and is in fact useless.
//#ifndef __APPLE__
// QMutexLocker mutexLocker(&m_mutex);
//#endif
unsigned int framesPerBuffer = maxLen / 4;