diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 9e0e15f..27e6d22 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -118,6 +118,7 @@ AppFrame::AppFrame() : wxGetApp().getSpectrumProcesor()->attachOutput(spectrumCanvas->getVisualDataQueue()); spectrumAvgMeter = new MeterCanvas(this, attribList); + spectrumAvgMeter->setHelpTip("Spectrum averaging speed, click or drag to adjust."); spectrumAvgMeter->setMax(1.0); spectrumAvgMeter->setLevel(0.65); spectrumAvgMeter->setShowUserInput(false); @@ -143,6 +144,7 @@ AppFrame::AppFrame() : wxGetApp().getWaterfallProcesor()->attachOutput(waterfallCanvas->getVisualDataQueue()); waterfallSpeedMeter = new MeterCanvas(this, attribList); + waterfallSpeedMeter->setHelpTip("Waterfall speed, click or drag to adjust (max 1024 lines per second)"); waterfallSpeedMeter->setMax(sqrt(1024)); waterfallSpeedMeter->setLevel(sqrt(DEFAULT_WATERFALL_LPS)); waterfallSpeedMeter->setShowUserInput(false); @@ -263,7 +265,7 @@ AppFrame::AppFrame() : // sampleRateMenuItems[wxID_BANDWIDTH_3000M] = menu->AppendRadioItem(wxID_BANDWIDTH_3000M, "3.0M"); sampleRateMenuItems[wxID_BANDWIDTH_3200M] = menu->AppendRadioItem(wxID_BANDWIDTH_3200M, "3.2M"); - sampleRateMenuItems[wxID_BANDWIDTH_2048M]->Check(true); + sampleRateMenuItems[wxID_BANDWIDTH_2400M]->Check(true); menuBar->Append(menu, wxT("&Input Bandwidth")); @@ -719,6 +721,8 @@ void AppFrame::OnIdle(wxIdleEvent& event) { float val = spectrumAvgMeter->getInputValue(); spectrumAvgMeter->setLevel(val); proc->setFFTAverageRate(val); + + GetStatusBar()->SetStatusText(wxString::Format(wxT("Spectrum averaging speed changed to %0.2f%%."),val*100.0)); } proc->setView(spectrumCanvas->getViewState()); @@ -750,6 +754,8 @@ void AppFrame::OnIdle(wxIdleEvent& event) { waterfallSpeedMeter->setLevel(val); fftDistrib.setLinesPerSecond((int)ceil(val*val)); wxGetApp().getWaterfallVisualQueue()->set_max_num_items((int)ceil(val*val)); + + GetStatusBar()->SetStatusText(wxString::Format(wxT("Waterfall max speed changed to %d lines per second."),(int)ceil(val*val))); } fftDistrib.run(); @@ -769,12 +775,13 @@ void AppFrame::OnIdle(wxIdleEvent& event) { if (this->IsVisible()) { waterfallCanvas->DoPaint(); demodWaterfallCanvas->DoPaint(); - } + } else { #ifndef _WIN32 - else { usleep(15000); - } +#else + Sleep(15); #endif + } event.RequestMore(); } diff --git a/src/CubicSDRDefs.h b/src/CubicSDRDefs.h index 677e68b..49df312 100644 --- a/src/CubicSDRDefs.h +++ b/src/CubicSDRDefs.h @@ -27,10 +27,10 @@ const char filePathSeparator = #define BUF_SIZE (16384*6) -#define DEFAULT_SAMPLE_RATE 2048000 +#define DEFAULT_SAMPLE_RATE 2400000 #define DEFAULT_FFT_SIZE 2048 #define DEFAULT_DEMOD_TYPE 1 #define DEFAULT_DEMOD_BW 200000 -#define DEFAULT_WATERFALL_LPS 30 \ No newline at end of file +#define DEFAULT_WATERFALL_LPS 30 diff --git a/src/process/ScopeVisualProcessor.cpp b/src/process/ScopeVisualProcessor.cpp index 7439977..15669da 100644 --- a/src/process/ScopeVisualProcessor.cpp +++ b/src/process/ScopeVisualProcessor.cpp @@ -17,6 +17,7 @@ void ScopeVisualProcessor::process() { return; } + audioInputData->busy_update.lock(); ScopeRenderData *renderData = outputBuffers.getBuffer(); renderData->channels = audioInputData->channels; @@ -44,6 +45,8 @@ void ScopeVisualProcessor::process() { renderData->waveform_points[i * 2 + 1] = audioInputData->data[i] / peak; } } + distribute(renderData); + audioInputData->busy_update.unlock(); } } diff --git a/src/util/GLExt.cpp b/src/util/GLExt.cpp index 47ccfdf..eb1e7d6 100644 --- a/src/util/GLExt.cpp +++ b/src/util/GLExt.cpp @@ -36,7 +36,11 @@ void initGLExtensions() { std::cout << std::endl << "Supported GL Extensions: " << std::endl << extensions << std::endl << std::endl; +#ifdef __linux__ + const GLint interval = 2; +#else const GLint interval = 1; +#endif #ifdef _WIN32 if (GLExtSupported("WGL_EXT_swap_control")) {