mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-27 06:08:37 -05:00
Whoops.. I can has memory leak?
This commit is contained in:
parent
655e4da1dc
commit
0c1f3149ac
@ -358,7 +358,6 @@ AppFrame::AppFrame() :
|
||||
SetAcceleratorTable(accel);
|
||||
|
||||
// frame rate = 1000 / 30 = 33ms
|
||||
frame_timer.Start(33);
|
||||
// static const int attribs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 };
|
||||
// wxLogStatus("Double-buffered display %s supported", wxGLCanvas::IsDisplaySupported(attribs) ? "is" : "not");
|
||||
// ShowFullScreen(true);
|
||||
@ -381,6 +380,10 @@ void AppFrame::initDeviceParams(std::string deviceId) {
|
||||
if (devConfig->getIQSwap()) {
|
||||
iqSwapMenuItem->Check();
|
||||
}
|
||||
|
||||
if (!frame_timer.IsRunning()) {
|
||||
frame_timer.Start(33);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -719,7 +722,8 @@ void AppFrame::OnTimer(wxTimerEvent& event) {
|
||||
} else {
|
||||
fftDistrib.setFFTSize(DEFAULT_FFT_SIZE);
|
||||
}
|
||||
fftDistrib.setLinesPerSecond(60);
|
||||
fftDistrib.setLinesPerSecond(24);
|
||||
wxGetApp().getWaterfallVisualQueue()->set_max_num_items(24);
|
||||
fftDistrib.run();
|
||||
|
||||
wproc->setView(waterfallCanvas->getViewState());
|
||||
|
@ -58,10 +58,10 @@ bool CubicSDR::OnInit() {
|
||||
spectrumDistributor.setInput(pipeIQVisualData);
|
||||
|
||||
pipeDemodIQVisualData = new DemodulatorThreadInputQueue();
|
||||
pipeIQVisualData->set_max_num_items(1);
|
||||
pipeDemodIQVisualData->set_max_num_items(1);
|
||||
|
||||
pipeSpectrumIQVisualData = new DemodulatorThreadInputQueue();
|
||||
pipeIQVisualData->set_max_num_items(1);
|
||||
pipeSpectrumIQVisualData->set_max_num_items(1);
|
||||
|
||||
pipeWaterfallIQVisualData = new DemodulatorThreadInputQueue();
|
||||
pipeWaterfallIQVisualData->set_max_num_items(512);
|
||||
|
@ -117,6 +117,7 @@ void SDRPostThread::run() {
|
||||
|
||||
if (iqVisualQueue != NULL && iqVisualQueue->empty()) {
|
||||
DemodulatorThreadIQData *visualDataOut = visualDataBuffers.getBuffer();
|
||||
visualDataOut->busy_rw.lock();
|
||||
visualDataOut->setRefCount(1);
|
||||
|
||||
if (visualDataOut->data.size() < num_vis_samples) {
|
||||
@ -130,6 +131,7 @@ void SDRPostThread::run() {
|
||||
visualDataOut->sampleRate = data_in->sampleRate;
|
||||
visualDataOut->data.assign(dataOut.begin(), dataOut.begin() + num_vis_samples);
|
||||
|
||||
visualDataOut->busy_rw.unlock();
|
||||
iqVisualQueue->push(visualDataOut);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user