kopia lustrzana https://github.com/jameshball/osci-render
15 wiersze
391 B
C++
15 wiersze
391 B
C++
#include "FrameProducer.h"
|
|
|
|
FrameProducer::FrameProducer(FrameConsumer& fc, FrameSource& fs) : frameConsumer(fc), frameSource(fs), juce::Thread("producer", 0) {}
|
|
|
|
FrameProducer::~FrameProducer() {
|
|
frameSource.disable();
|
|
stopThread(-1);
|
|
}
|
|
|
|
void FrameProducer::run() {
|
|
while (!threadShouldExit() && frameSource.isActive()) {
|
|
frameConsumer.addFrame(frameSource.next());
|
|
}
|
|
}
|