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

pull/27/head
f4exb 2016-12-25 20:04:19 +01:00
rodzic e05822ba02
commit 53f6413bd9
2 zmienionych plików z 189 dodań i 187 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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;