2014-10-27 20:05:40 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
//WX_GL_CORE_PROFILE 1
|
|
|
|
//WX_GL_MAJOR_VERSION 3
|
|
|
|
//WX_GL_MINOR_VERSION 2
|
|
|
|
|
2014-11-23 19:39:27 -05:00
|
|
|
#include <thread>
|
|
|
|
|
2014-10-27 21:22:29 -04:00
|
|
|
#include "wx/glcanvas.h"
|
|
|
|
#include "PrimaryGLContext.h"
|
2014-10-27 20:05:40 -04:00
|
|
|
|
2014-11-23 19:39:27 -05:00
|
|
|
#include "ThreadQueue.h"
|
|
|
|
#include "SDRThread.h"
|
2014-11-29 13:58:20 -05:00
|
|
|
#include "SDRPostThread.h"
|
2014-11-23 19:39:27 -05:00
|
|
|
#include "AudioThread.h"
|
|
|
|
#include "DemodulatorMgr.h"
|
|
|
|
|
2014-10-28 21:39:59 -04:00
|
|
|
class CubicSDR: public wxApp {
|
2014-10-27 20:05:40 -04:00
|
|
|
public:
|
2014-10-28 21:39:59 -04:00
|
|
|
CubicSDR() {
|
|
|
|
m_glContext = NULL;
|
|
|
|
}
|
2014-10-27 20:05:40 -04:00
|
|
|
|
2014-10-27 21:22:29 -04:00
|
|
|
PrimaryGLContext &GetContext(wxGLCanvas *canvas);
|
2014-10-27 20:05:40 -04:00
|
|
|
|
|
|
|
virtual bool OnInit();
|
|
|
|
virtual int OnExit();
|
|
|
|
|
2014-11-23 19:39:27 -05:00
|
|
|
void setFrequency(unsigned int freq);
|
|
|
|
int getFrequency();
|
|
|
|
|
|
|
|
DemodulatorThreadOutputQueue* getAudioVisualQueue() {
|
|
|
|
return audioVisualQueue;
|
|
|
|
}
|
|
|
|
|
|
|
|
SDRThreadIQDataQueue* getIQVisualQueue() {
|
|
|
|
return iqVisualQueue;
|
|
|
|
}
|
|
|
|
|
2014-11-25 22:51:14 -05:00
|
|
|
DemodulatorInstance *getDemodTest() {
|
|
|
|
return demodulatorTest;
|
|
|
|
}
|
|
|
|
|
2014-11-26 21:05:19 -05:00
|
|
|
DemodulatorMgr &getDemodMgr() {
|
|
|
|
return demodMgr;
|
|
|
|
}
|
|
|
|
|
2014-10-27 20:05:40 -04:00
|
|
|
private:
|
|
|
|
PrimaryGLContext *m_glContext;
|
2014-11-04 17:25:04 -05:00
|
|
|
|
2014-11-23 19:39:27 -05:00
|
|
|
DemodulatorMgr demodMgr;
|
|
|
|
|
|
|
|
unsigned int frequency;
|
|
|
|
|
|
|
|
DemodulatorInstance *demodulatorTest;
|
|
|
|
|
|
|
|
AudioThreadInputQueue *audioInputQueue;
|
|
|
|
AudioThread *audioThread;
|
|
|
|
|
|
|
|
SDRThread *sdrThread;
|
2014-11-29 13:58:20 -05:00
|
|
|
SDRPostThread *sdrPostThread;
|
2014-11-23 19:39:27 -05:00
|
|
|
SDRThreadCommandQueue* threadCmdQueueSDR;
|
|
|
|
SDRThreadIQDataQueue* iqVisualQueue;
|
2014-11-29 13:58:20 -05:00
|
|
|
SDRThreadIQDataQueue* iqPostDataQueue;
|
2014-11-23 19:39:27 -05:00
|
|
|
DemodulatorThreadOutputQueue* audioVisualQueue;
|
|
|
|
|
|
|
|
std::thread *threadAudio;
|
|
|
|
std::thread *threadSDR;
|
2014-11-29 13:58:20 -05:00
|
|
|
std::thread *threadPostSDR;
|
2014-10-27 20:05:40 -04:00
|
|
|
};
|
|
|
|
|
2014-10-27 21:22:29 -04:00
|
|
|
DECLARE_APP(CubicSDR)
|