Move code out of frame, proper thread termination

This commit is contained in:
Charles J. Cliffe
2014-11-23 19:39:27 -05:00
parent ac20bc1e84
commit cae1855fc5
15 changed files with 171 additions and 196 deletions
+1 -23
View File
@@ -2,14 +2,11 @@
#include "wx/frame.h"
#include "PrimaryGLContext.h"
#include "SDRThread.h"
#include "AudioThread.h"
#include "DemodulatorMgr.h"
#include "ScopeCanvas.h"
#include "SpectrumCanvas.h"
#include "WaterfallCanvas.h"
#include "ThreadQueue.h"
// Define a new frame type
class AppFrame: public wxFrame {
@@ -19,8 +16,6 @@ public:
void OnThread(wxCommandEvent& event);
void OnEventInput(wxThreadEvent& event);
void setFrequency(unsigned int freq);
int getFrequency();
private:
void OnClose(wxCommandEvent& event);
@@ -31,23 +26,6 @@ private:
SpectrumCanvas *spectrumCanvas;
WaterfallCanvas *waterfallCanvas;
DemodulatorMgr demodMgr;
wxCriticalSection m_pThreadCS;
unsigned int frequency;
DemodulatorInstance *demodulatorTest;
AudioThreadInputQueue *audioInputQueue;
AudioThread *audioThread;
SDRThread *sdrThread;
SDRThreadCommandQueue* threadCmdQueueSDR;
SDRThreadIQDataQueue* iqVisualQueue;
DemodulatorThreadOutputQueue* audioVisualQueue;
std::thread *threadAudio;
std::thread *threadSDR;
// event table
wxDECLARE_EVENT_TABLE();