24 |
#include "../common/global.h" |
#include "../common/global.h" |
25 |
#include "../common/Thread.h" |
#include "../common/Thread.h" |
26 |
#include "../common/Condition.h" |
#include "../common/Condition.h" |
27 |
#include "../common/RingBuffer.h" |
#include "../common/Mutex.h" |
28 |
#include "../Sampler.h" |
#include "../Sampler.h" |
29 |
#include "InstrumentManager.h" |
#include "InstrumentManager.h" |
30 |
|
|
31 |
/// Maximum numbers of instruments waiting to be loaded by the InstrumentLoader. |
#include <list> |
|
#define INSTRUMENT_LOADER_QUEUE_SIZE 200 |
|
32 |
|
|
33 |
namespace LinuxSampler { |
namespace LinuxSampler { |
34 |
|
|
58 |
}; |
}; |
59 |
|
|
60 |
// Instance variables. |
// Instance variables. |
61 |
RingBuffer<command_t,true>* pQueue; ///< queue with commands for loading new instruments. |
std::list<command_t> queue; ///< queue with commands for loading new instruments. |
62 |
Condition conditionJobsLeft; ///< synchronizer to block this thread until a new job arrives |
Mutex mutex; ///< for making the queue thread safe |
63 |
|
Condition conditionJobsLeft; ///< synchronizer to block this thread until a new job arrives |
64 |
|
|
65 |
int Main(); ///< Implementation of virtual method from class Thread. |
int Main(); ///< Implementation of virtual method from class Thread. |
66 |
}; |
}; |