mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-11 10:18:52 -04:00
Merge pull request #398 from vsonnier/thread_clean_3
thread_clean_3: Multithreading AudioThread hardening, use of try_pop() and more.
This commit is contained in:
+3
-2
@@ -806,11 +806,11 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
|
||||
#endif
|
||||
else if (event.GetId() == wxID_SDR_START_STOP) {
|
||||
if (!wxGetApp().getSDRThread()->isTerminated()) {
|
||||
wxGetApp().stopDevice(true);
|
||||
wxGetApp().stopDevice(true, 2000);
|
||||
} else {
|
||||
SDRDeviceInfo *dev = wxGetApp().getDevice();
|
||||
if (dev != nullptr) {
|
||||
wxGetApp().setDevice(dev);
|
||||
wxGetApp().setDevice(dev, 0);
|
||||
}
|
||||
}
|
||||
} else if (event.GetId() == wxID_LOW_PERF) {
|
||||
@@ -1645,6 +1645,7 @@ bool AppFrame::loadSession(std::string fileName) {
|
||||
}
|
||||
|
||||
wxGetApp().getDemodMgr().setActiveDemodulator(nullptr, false);
|
||||
|
||||
wxGetApp().getDemodMgr().terminateAll();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user