mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-04 14:17:51 -04:00
Adds test #define for default demodulator count
This commit is contained in:
parent
80ac3175a3
commit
09848bfdec
@ -21,12 +21,14 @@ bool CubicSDR::OnInit() {
|
|||||||
|
|
||||||
frequency = DEFAULT_FREQ;
|
frequency = DEFAULT_FREQ;
|
||||||
|
|
||||||
demodulatorTest = demodMgr.newThread();
|
for (int i = 0; i < NUM_DEMODULATORS; i++) {
|
||||||
demodulatorTest->getParams().frequency = DEFAULT_FREQ;
|
demodulatorTest[i] = demodMgr.newThread();
|
||||||
demodulatorTest->run();
|
demodulatorTest[i]->getParams().frequency = DEFAULT_FREQ;
|
||||||
|
demodulatorTest[i]->run();
|
||||||
|
}
|
||||||
|
|
||||||
audioVisualQueue = new DemodulatorThreadOutputQueue();
|
audioVisualQueue = new DemodulatorThreadOutputQueue();
|
||||||
demodulatorTest->setVisualOutputQueue(audioVisualQueue);
|
demodulatorTest[0]->setVisualOutputQueue(audioVisualQueue);
|
||||||
|
|
||||||
threadCmdQueueSDR = new SDRThreadCommandQueue;
|
threadCmdQueueSDR = new SDRThreadCommandQueue;
|
||||||
sdrThread = new SDRThread(threadCmdQueueSDR);
|
sdrThread = new SDRThread(threadCmdQueueSDR);
|
||||||
@ -40,7 +42,9 @@ bool CubicSDR::OnInit() {
|
|||||||
sdrPostThread->setIQDataInQueue(iqPostDataQueue);
|
sdrPostThread->setIQDataInQueue(iqPostDataQueue);
|
||||||
sdrPostThread->setIQVisualQueue(iqVisualQueue);
|
sdrPostThread->setIQVisualQueue(iqVisualQueue);
|
||||||
|
|
||||||
sdrPostThread->bindDemodulator(demodulatorTest);
|
for (int i = 0; i < NUM_DEMODULATORS; i++) {
|
||||||
|
sdrPostThread->bindDemodulator(demodulatorTest[i]);
|
||||||
|
}
|
||||||
|
|
||||||
t_PostSDR = new std::thread(&SDRPostThread::threadMain, sdrPostThread);
|
t_PostSDR = new std::thread(&SDRPostThread::threadMain, sdrPostThread);
|
||||||
t_SDR = new std::thread(&SDRThread::threadMain, sdrThread);
|
t_SDR = new std::thread(&SDRThread::threadMain, sdrThread);
|
||||||
|
@ -15,11 +15,13 @@
|
|||||||
#include "AudioThread.h"
|
#include "AudioThread.h"
|
||||||
#include "DemodulatorMgr.h"
|
#include "DemodulatorMgr.h"
|
||||||
|
|
||||||
|
#define NUM_DEMODULATORS 3
|
||||||
|
|
||||||
class CubicSDR: public wxApp {
|
class CubicSDR: public wxApp {
|
||||||
public:
|
public:
|
||||||
CubicSDR() :
|
CubicSDR() :
|
||||||
m_glContext(NULL), t_PostSDR(NULL), t_SDR(NULL), audioVisualQueue(NULL), threadCmdQueueSDR(NULL), iqVisualQueue(NULL), frequency(
|
m_glContext(NULL), t_PostSDR(NULL), t_SDR(NULL), audioVisualQueue(NULL), threadCmdQueueSDR(NULL), iqVisualQueue(NULL), frequency(
|
||||||
DEFAULT_FREQ), sdrPostThread(NULL), iqPostDataQueue(NULL), sdrThread(NULL), demodulatorTest(NULL) {
|
DEFAULT_FREQ), sdrPostThread(NULL), iqPostDataQueue(NULL), sdrThread(NULL) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +42,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
DemodulatorInstance *getDemodTest() {
|
DemodulatorInstance *getDemodTest() {
|
||||||
return demodulatorTest;
|
return demodulatorTest[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
DemodulatorMgr &getDemodMgr() {
|
DemodulatorMgr &getDemodMgr() {
|
||||||
@ -54,7 +56,7 @@ private:
|
|||||||
|
|
||||||
unsigned int frequency;
|
unsigned int frequency;
|
||||||
|
|
||||||
DemodulatorInstance *demodulatorTest;
|
DemodulatorInstance *demodulatorTest[NUM_DEMODULATORS];
|
||||||
|
|
||||||
SDRThread *sdrThread;
|
SDRThread *sdrThread;
|
||||||
SDRPostThread *sdrPostThread;
|
SDRPostThread *sdrPostThread;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user