mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-23 12:18:37 -05:00
DemodulatorThread visual out queue /w IOThread::onBindOutput
This commit is contained in:
parent
0a9dd7692a
commit
5bbcf7aa11
@ -23,16 +23,15 @@ DemodulatorInstance::DemodulatorInstance() :
|
||||
threadQueuePostDemod = new DemodulatorThreadPostInputQueue;
|
||||
threadQueueCommand = new DemodulatorThreadCommandQueue;
|
||||
threadQueueNotify = new DemodulatorThreadCommandQueue;
|
||||
threadQueueControl = new DemodulatorThreadControlCommandQueue;
|
||||
|
||||
demodulatorPreThread = new DemodulatorPreThread();
|
||||
demodulatorPreThread->setInputQueue("IQDataInput",threadQueueDemod);
|
||||
demodulatorPreThread->setOutputQueue("IQDataOut",threadQueuePostDemod);
|
||||
demodulatorPreThread->setInputQueue("ControlQueue",threadQueueControl);
|
||||
demodulatorPreThread->setOutputQueue("NotifyQueue",threadQueueNotify);
|
||||
demodulatorPreThread->setInputQueue("CommandQueue",threadQueueCommand);
|
||||
|
||||
audioInputQueue = new AudioThreadInputQueue;
|
||||
threadQueueControl = new DemodulatorThreadControlCommandQueue;
|
||||
|
||||
demodulatorThread = new DemodulatorThread();
|
||||
demodulatorThread->setInputQueue("IQDataInput",threadQueuePostDemod);
|
||||
@ -57,7 +56,7 @@ DemodulatorInstance::~DemodulatorInstance() {
|
||||
}
|
||||
|
||||
void DemodulatorInstance::setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue) {
|
||||
demodulatorThread->setVisualOutputQueue(tQueue);
|
||||
demodulatorThread->setOutputQueue("AudioVisualOutput", tQueue);
|
||||
}
|
||||
|
||||
void DemodulatorInstance::run() {
|
||||
|
@ -28,6 +28,12 @@ DemodulatorThread::DemodulatorThread() : IOThread(), iqAutoGain(NULL), amOutputC
|
||||
DemodulatorThread::~DemodulatorThread() {
|
||||
}
|
||||
|
||||
void DemodulatorThread::onBindOutput(std::string name, ThreadQueueBase *threadQueue) {
|
||||
if (name == "AudioVisualOutput") {
|
||||
audioVisOutputQueue = (DemodulatorThreadOutputQueue *)threadQueue;
|
||||
}
|
||||
}
|
||||
|
||||
void DemodulatorThread::run() {
|
||||
#ifdef __APPLE__
|
||||
pthread_t tID = pthread_self(); // ID of this thread
|
||||
@ -490,10 +496,6 @@ void DemodulatorThread::run() {
|
||||
std::cout << "Demodulator thread done." << std::endl;
|
||||
}
|
||||
|
||||
void DemodulatorThread::setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue) {
|
||||
audioVisOutputQueue = tQueue;
|
||||
}
|
||||
|
||||
void DemodulatorThread::terminate() {
|
||||
terminated = true;
|
||||
DemodulatorThreadPostIQData *inp = new DemodulatorThreadPostIQData; // push dummy to nudge queue
|
||||
|
@ -16,10 +16,9 @@ public:
|
||||
DemodulatorThread();
|
||||
~DemodulatorThread();
|
||||
|
||||
void onBindOutput(std::string name, ThreadQueueBase *threadQueue);
|
||||
|
||||
void run();
|
||||
|
||||
void setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue);
|
||||
|
||||
void terminate();
|
||||
|
||||
void setStereo(bool state);
|
||||
|
Loading…
Reference in New Issue
Block a user