changed busy flag into busy mutex, improves thread safety

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@352 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2006-08-20 01:59:30 +00:00
parent 3f3ce616f6
commit d21d08c2e1
3 changed files with 150 additions and 143 deletions

View File

@@ -89,7 +89,7 @@ public:
float FASTCALL level( f_cnt_t _frame,
const f_cnt_t _release_begin,
const f_cnt_t _frame_offset ) const;
const f_cnt_t _frame_offset );
inline bool used( void ) const
{
@@ -105,6 +105,15 @@ public:
return( "el" );
}
void lock( void )
{
m_busyMutex.lock();
}
void unlock( void )
{
m_busyMutex.unlock();
}
public slots:
void updateSampleVars( void );
@@ -183,7 +192,7 @@ private:
USER
} m_lfoShape;
volatile bool m_busy;
QMutex m_busyMutex;