From 91504392838b9a66c81dee7cb20baa0bfcfda2cf Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Tue, 18 Nov 2014 19:02:07 -0500 Subject: [PATCH] Thread priority bump, main thread sleep --- src/AppFrame.cpp | 4 ++++ src/demod/DemodulatorMgr.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 647e9a6..1f01055 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -64,6 +64,7 @@ AppFrame::AppFrame() : delete t_SDR; t_SDR = NULL; } + t_SDR->SetPriority(80); threadQueueAudio = new AudioThreadQueue(this); t_Audio = new AudioThread(threadQueueAudio); @@ -73,6 +74,7 @@ AppFrame::AppFrame() : delete t_Audio; t_Audio = NULL; } + t_Audio->SetPriority(80); demodulatorTest = demodMgr.newThread(this); demodulatorTest->params.audioQueue = threadQueueAudio; @@ -162,6 +164,8 @@ void AppFrame::OnThread(wxCommandEvent& event) { void AppFrame::OnIdle(wxIdleEvent& event) { + Sleep(10); + event.Skip(); } diff --git a/src/demod/DemodulatorMgr.h b/src/demod/DemodulatorMgr.h index 5b5113a..d27c472 100644 --- a/src/demod/DemodulatorMgr.h +++ b/src/demod/DemodulatorMgr.h @@ -29,7 +29,6 @@ public: bool run() { init(); - if (t_Demod->Run() != wxTHREAD_NO_ERROR) { wxLogError ("Can't create the Demodulator thread!"); @@ -39,6 +38,7 @@ public: threadQueueDemod = NULL; return false; } + t_Demod->SetPriority(80); return true; }