mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-04-17 00:48:35 -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;
|
||||
|
||||
demodulatorTest = demodMgr.newThread();
|
||||
demodulatorTest->getParams().frequency = DEFAULT_FREQ;
|
||||
demodulatorTest->run();
|
||||
for (int i = 0; i < NUM_DEMODULATORS; i++) {
|
||||
demodulatorTest[i] = demodMgr.newThread();
|
||||
demodulatorTest[i]->getParams().frequency = DEFAULT_FREQ;
|
||||
demodulatorTest[i]->run();
|
||||
}
|
||||
|
||||
audioVisualQueue = new DemodulatorThreadOutputQueue();
|
||||
demodulatorTest->setVisualOutputQueue(audioVisualQueue);
|
||||
demodulatorTest[0]->setVisualOutputQueue(audioVisualQueue);
|
||||
|
||||
threadCmdQueueSDR = new SDRThreadCommandQueue;
|
||||
sdrThread = new SDRThread(threadCmdQueueSDR);
|
||||
@ -40,7 +42,9 @@ bool CubicSDR::OnInit() {
|
||||
sdrPostThread->setIQDataInQueue(iqPostDataQueue);
|
||||
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_SDR = new std::thread(&SDRThread::threadMain, sdrThread);
|
||||
|
@ -15,11 +15,13 @@
|
||||
#include "AudioThread.h"
|
||||
#include "DemodulatorMgr.h"
|
||||
|
||||
#define NUM_DEMODULATORS 3
|
||||
|
||||
class CubicSDR: public wxApp {
|
||||
public:
|
||||
CubicSDR() :
|
||||
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() {
|
||||
return demodulatorTest;
|
||||
return demodulatorTest[0];
|
||||
}
|
||||
|
||||
DemodulatorMgr &getDemodMgr() {
|
||||
@ -54,7 +56,7 @@ private:
|
||||
|
||||
unsigned int frequency;
|
||||
|
||||
DemodulatorInstance *demodulatorTest;
|
||||
DemodulatorInstance *demodulatorTest[NUM_DEMODULATORS];
|
||||
|
||||
SDRThread *sdrThread;
|
||||
SDRPostThread *sdrPostThread;
|
||||
|
Loading…
Reference in New Issue
Block a user