* Named conditions; one data condition per channel

This commit is contained in:
Chris Cannam
2007-11-26 21:51:05 +00:00
parent d58531e2ca
commit ceec06a697
5 changed files with 45 additions and 24 deletions

View File

@@ -137,21 +137,23 @@ protected:
Window<float> *m_window;
FFT *m_studyFFT;
Condition m_dataAvailable;
Condition m_spaceAvailable;
class ProcessThread : public Thread
{
public:
ProcessThread(Impl *s, size_t c) : m_s(s), m_channel(c) { }
ProcessThread(Impl *s, size_t c);
void run();
void signalDataAvailable();
private:
Impl *m_s;
size_t m_channel;
Condition m_dataAvailable;
};
mutable Mutex m_threadSetMutex;
std::set<ProcessThread *> m_threadSet;
typedef std::set<ProcessThread *> ThreadSet;
ThreadSet m_threadSet;
size_t m_inputDuration;