diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index d758322..4463da5 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -561,12 +561,6 @@ void AppFrame::OnThread(wxCommandEvent& event) { } void AppFrame::OnIdle(wxIdleEvent& event) { - bool work_done = false; - -//#ifdef __APPLE__ -// std::this_thread::sleep_for(std::chrono::milliseconds(4)); -// std::this_thread::yield(); -//#endif DemodulatorInstance *demod = wxGetApp().getDemodMgr().getLastActiveDemodulator(); diff --git a/src/audio/AudioThread.cpp b/src/audio/AudioThread.cpp index 0c48fbb..789e016 100644 --- a/src/audio/AudioThread.cpp +++ b/src/audio/AudioThread.cpp @@ -12,13 +12,13 @@ std::map AudioThread::deviceSampleRate; std::map AudioThread::deviceThread; AudioThread::AudioThread() : IOThread(), - currentInput(NULL), inputQueue(NULL), gain( - 1.0), threadQueueNotify(NULL), sampleRate(0), nBufferFrames(1024) { + currentInput(NULL), inputQueue(NULL), nBufferFrames(1024), threadQueueNotify(NULL), sampleRate(0) { audioQueuePtr.store(0); underflowCount.store(0); active.store(false); outputDevice.store(-1); + gain.store(1.0); boundThreads = new std::vector; } diff --git a/src/demod/DemodulatorThread.cpp b/src/demod/DemodulatorThread.cpp index 70306f2..d987a15 100644 --- a/src/demod/DemodulatorThread.cpp +++ b/src/demod/DemodulatorThread.cpp @@ -188,7 +188,6 @@ void DemodulatorThread::run() { } else if (demodulatorType == DEMOD_TYPE_RAW) { // do nothing here.. } else { - float p; switch (demodulatorType.load()) { case DEMOD_TYPE_LSB: for (int i = 0; i < bufSize; i++) { // Reject upper band diff --git a/src/util/DataTree.cpp b/src/util/DataTree.cpp index 1a17ec7..e150307 100755 --- a/src/util/DataTree.cpp +++ b/src/util/DataTree.cpp @@ -1598,8 +1598,8 @@ bool DataTree::LoadFromFile(const std::string& filename) { string compressionType(*header->getNext("compression")); dataSize = *header->getNext("uncompressed_size"); - bool uncompress = false; #if USE_FASTLZ + bool uncompress = false; if (compressionType == "FastLZ") { uncompress = true; } diff --git a/src/util/GLExt.cpp b/src/util/GLExt.cpp index f3a50a0..1de46d8 100644 --- a/src/util/GLExt.cpp +++ b/src/util/GLExt.cpp @@ -36,8 +36,6 @@ void initGLExtensions() { std::cout << std::endl << "Supported GL Extensions: " << std::endl << extensions << std::endl << std::endl; - int interval = 2; - #ifdef _WIN32 if (GLExtSupported("WGL_EXT_swap_control")) { std::cout << "Initializing WGL swap control extensions.." << std::endl; diff --git a/src/util/GLFont.cpp b/src/util/GLFont.cpp index d922e33..75109ae 100644 --- a/src/util/GLFont.cpp +++ b/src/util/GLFont.cpp @@ -103,7 +103,7 @@ int GLFontChar::getIndex() { } GLFont::GLFont() : - numCharacters(0), lineHeight(0), base(0), imageWidth(0), imageHeight(0), loaded(false), texId(0) { + lineHeight(0), base(0), imageWidth(0), imageHeight(0), loaded(false), texId(0) { } diff --git a/src/util/GLFont.h b/src/util/GLFont.h index 825459b..048095a 100644 --- a/src/util/GLFont.h +++ b/src/util/GLFont.h @@ -76,7 +76,6 @@ private: std::string getParamKey(std::string param_str); std::string getParamValue(std::string param_str); - int numCharacters; int lineHeight; int base; int imageWidth, imageHeight; diff --git a/src/visual/SpectrumContext.cpp b/src/visual/SpectrumContext.cpp index 8ee8cd7..22b78b7 100644 --- a/src/visual/SpectrumContext.cpp +++ b/src/visual/SpectrumContext.cpp @@ -7,7 +7,7 @@ #include "ColorTheme.h" SpectrumContext::SpectrumContext(SpectrumCanvas *canvas, wxGLContext *sharedContext) : - PrimaryGLContext(canvas, sharedContext), fft_size(0), floorValue(0), ceilValue(1) { + PrimaryGLContext(canvas, sharedContext), floorValue(0), ceilValue(1) { glDisable(GL_CULL_FACE); glDisable(GL_DEPTH_TEST); diff --git a/src/visual/SpectrumContext.h b/src/visual/SpectrumContext.h index 13e3f98..03cc82a 100644 --- a/src/visual/SpectrumContext.h +++ b/src/visual/SpectrumContext.h @@ -19,6 +19,5 @@ public: void setCeilValue(float ceilValue); private: - int fft_size; float floorValue, ceilValue; }; diff --git a/src/visual/TuningCanvas.cpp b/src/visual/TuningCanvas.cpp index 5582f30..daed27e 100644 --- a/src/visual/TuningCanvas.cpp +++ b/src/visual/TuningCanvas.cpp @@ -31,7 +31,7 @@ EVT_KEY_UP(TuningCanvas::OnKeyUp) wxEND_EVENT_TABLE() TuningCanvas::TuningCanvas(wxWindow *parent, int *attribList) : - InteractiveCanvas(parent, attribList), dragAccum(0), top(false), bottom(false), uxDown(0) { + InteractiveCanvas(parent, attribList), dragAccum(0), uxDown(0), top(false), bottom(false) { glContext = new TuningContext(this, &wxGetApp().GetContext(this)); diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp index 4efa1e6..7fe2011 100644 --- a/src/visual/WaterfallCanvas.cpp +++ b/src/visual/WaterfallCanvas.cpp @@ -36,7 +36,7 @@ wxEND_EVENT_TABLE() WaterfallCanvas::WaterfallCanvas(wxWindow *parent, int *attribList) : InteractiveCanvas(parent, attribList), dragState(WF_DRAG_NONE), nextDragState(WF_DRAG_NONE), fft_size(0), waterfall_lines( - 0), zoom(1), mouseZoom(1), hoverAlpha(1.0), dragOfs(0) { + 0), mouseZoom(1), zoom(1), hoverAlpha(1.0), dragOfs(0) { glContext = new WaterfallContext(this, &wxGetApp().GetContext(this)); @@ -173,7 +173,6 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { int currentBandwidth = getBandwidth(); long long currentCenterFreq = getCenterFrequency(); - float demodColor, selectorColor; ColorTheme *currentTheme = ThemeMgr::mgr.currentTheme; int last_type = wxGetApp().getDemodMgr().getLastDemodulatorType(); @@ -260,13 +259,11 @@ void WaterfallCanvas::OnKeyUp(wxKeyEvent& event) { void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) { InteractiveCanvas::OnKeyDown(event); - float angle = 5.0; DemodulatorInstance *activeDemod = wxGetApp().getDemodMgr().getActiveDemodulator(); long long freq; long long originalFreq; - unsigned int bw; switch (event.GetKeyCode()) { case 'A': zoom = 0.95; @@ -425,7 +422,6 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) { setStatusText("Click and drag to set the current demodulator range."); } } else if (demodsHover->size() && !shiftDown) { - int hovered = -1; long near_dist = getBandwidth(); DemodulatorInstance *activeDemodulator = NULL; diff --git a/src/visual/WaterfallCanvas.h b/src/visual/WaterfallCanvas.h index 5c80c27..e7f3384 100644 --- a/src/visual/WaterfallCanvas.h +++ b/src/visual/WaterfallCanvas.h @@ -57,7 +57,6 @@ private: int waterfall_lines; int dragOfs; - int lastInputBandwidth; float mouseZoom, zoom; float hoverAlpha; diff --git a/src/visual/WaterfallContext.cpp b/src/visual/WaterfallContext.cpp index 3ff3e30..733cfc9 100644 --- a/src/visual/WaterfallContext.cpp +++ b/src/visual/WaterfallContext.cpp @@ -3,7 +3,7 @@ #include "CubicSDR.h" WaterfallContext::WaterfallContext(WaterfallCanvas *canvas, wxGLContext *sharedContext) : - PrimaryGLContext(canvas, sharedContext), waterfall_lines(0), waterfall_slice(NULL), fft_size(0), activeTheme(NULL) { + PrimaryGLContext(canvas, sharedContext), fft_size(0), waterfall_lines(0), waterfall_slice(NULL), activeTheme(NULL) { for (int i = 0; i < 2; i++) { waterfall[i] = 0; }