Merge pull request #145 from wongcc966422/ghostPeakController

Fixes Ghost Peak Controller Bug
This commit is contained in:
Tobias Doerffel
2014-01-25 11:13:13 -08:00
4 changed files with 31 additions and 1 deletions

View File

@@ -89,12 +89,24 @@ public:
m_dataMutex.unlock();
}
bool isPreviewing()
{
bool ret = m_dataMutex.tryLock();
if( ret == true )
{
m_dataMutex.unlock();
}
return ret;
}
private:
InstrumentTrack * m_previewInstrumentTrack;
notePlayHandle * m_previewNote;
QMutex m_dataMutex;
friend class presetPreviewPlayHandle;
} ;
@@ -242,3 +254,17 @@ ConstNotePlayHandleList presetPreviewPlayHandle::nphsOfInstrumentTrack(
}
bool presetPreviewPlayHandle::isPreviewing()
{
bool ret = s_previewTC->m_dataMutex.tryLock();
if( ret == true )
{
s_previewTC->m_dataMutex.unlock();
}
return ret;
}