initial support for parallel rendering via worker-threads - far from being perfect (especially with small mixer-period-sizes) but seems to help even on a DualCore machine
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms-mv@720 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#endif
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QSemaphore>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
@@ -91,6 +92,8 @@ const tones BASE_TONE = A;
|
||||
const octaves BASE_OCTAVE = OCTAVE_4;
|
||||
|
||||
|
||||
class mixerWorkerThread;
|
||||
|
||||
|
||||
class mixer : public QObject
|
||||
{
|
||||
@@ -361,7 +364,10 @@ private:
|
||||
bool m_newBuffer[SURROUND_CHANNELS];
|
||||
|
||||
Uint8 m_cpuLoad;
|
||||
int m_parallelizingLevel;
|
||||
bool m_multiThreaded;
|
||||
QVector<mixerWorkerThread *> m_workers;
|
||||
QSemaphore m_workerSem;
|
||||
|
||||
|
||||
playHandleVector m_playHandles;
|
||||
constPlayHandleVector m_playHandlesToRemove;
|
||||
@@ -389,6 +395,7 @@ private:
|
||||
|
||||
|
||||
friend class engine;
|
||||
friend class mixerWorkerThread;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user