Commit Graph

1085 Commits

Author SHA1 Message Date
vsonnier
e32e687fe8 Make IOThreads terminate() fully non-blocking and misc.
- Thanks to timed-pop() usage, it is no longer needed to nudge queues with dummy to wake them
- Less bad luck to be stuck there
- Misc: leave the trace about the audio thread staturation, useful despite it raises some alarm among users...
2017-08-14 09:46:53 +02:00
vsonnier
acc6d2a31d Restart the device automatically if stuck with read stream errors 2017-08-13 22:14:12 +02:00
vsonnier
c64baab99d Threads vs. Queues lifetimes, cleanups.
- Ideally Queues must outlive the threads using them, but wasn't done so. Yes, std::shared_ptr them!
- Now queues are always valid in the context of the threads using them.
- No longer need tedious queues deallocation by the original owner.
- Misc cleanups.
2017-08-13 19:19:25 +02:00
vsonnier
98c7c30aee Yet another Thread termination problem found, and try killing the app if the closing turns bad 2017-08-13 12:11:14 +02:00
vsonnier
33107bfa9e Fix #565, Solo mode is now saved into session files 2017-08-12 18:09:36 +02:00
vsonnier
e67a29f5b6 Don't get stuck when closing application just because some Demodulators refuse to die 2017-08-12 11:30:32 +02:00
vsonnier
33aa0cade6 Fix bad re-loading, setting and UI glitches for Device Runtime settings, and misc.
- Quite obvious on the SDRPlay RSP2 for ex.
- Random cleanups by using the for-each construct at some places for clarity.
2017-08-12 08:17:40 +02:00
Dell-Ray Sackett
ab6cb059b9 boolean not a valid keyword
changed boolean to bool in garbageCollect
2017-06-01 21:12:06 -07:00
Dell-Ray Sackett
b315bac97f Change boolean to bool
void DemodulatorMgr::garbageCollect(boolean forcedGC)
should be 
void DemodulatorMgr::garbageCollect(bool forcedGC)
2017-06-01 21:05:49 -07:00
vsonnier
3604b7f1ff Even better thread and application termination:
- Now that timed-pop()/try_pop() prevent indefinite blocking it is best to flush() on thread stopping to unblock push()
- Reworked a bit the CubicSDR::OnExit() sequence, see comments.
2017-06-01 19:57:58 +02:00
vsonnier
8f608bbf5c Cleanup: remove some unused params and variables, conversion warnings seen with #550. 2017-05-29 20:22:10 +02:00
vsonnier
3095f8205a CubicVR2: more restricted operators on structures by removing convert-to-pointer. (Fix #550 ?) 2017-05-28 12:59:08 +02:00
vsonnier
56b56685e0 Yet Another Semicolon After Endif left... (#549) 2017-05-27 15:28:42 +02:00
vsonnier
3de3d3eee8 Tentative fix #549 prt 3 2017-05-27 12:36:47 +02:00
vsonnier
b3dd0b0d6e Tentative fix #548 part 2 2017-05-27 09:49:19 +02:00
vsonnier
d170f731c5 Fix #549, plus more usual syntax for #548 2017-05-27 07:46:28 +02:00
vsonnier
fcf9f0bb82 Potential fix for #548, to be tested in Nix-like environnements 2017-05-26 23:22:43 +02:00
vsonnier
a0526f757e ReBuffer somewhat cleaner, safer code 2017-05-26 10:29:47 +02:00
vsonnier
44cdfa8521 Make ReBuffer also GC its own memory + cleanups:
- Use deque in ReBuffer instead of vector (as before) because it allows freeing its memory
- Random cleanup: remove mutable when not needed.
2017-05-25 16:39:01 +02:00
vsonnier
9b0ce69e8f Use the nuclear option to solve the hung problem:
Besides deadlocks, a thread can in theory get stuck in a blocking pop(),
not seeing the stopping flag in particular. So assure liveness by making all
pop() timed pop.
2017-05-25 09:32:27 +02:00
vsonnier
77a82e1617 Another fix for the neverending hung application bugs:
- Clear up DemodulatorInstance garbage collection, only do it in a single thread (AppFrame::OnIdle)
- Add a specific mutex lock for the list of deleted demodulators,
- Add a specific lock to control DemodulatorInstance thread lifetimes, protecting IsTerminated() of concurrent join and delete
2017-05-25 08:03:08 +02:00
vsonnier
4b323e9863 Make ReBuffer refcount management automatic, using std::shared_ptr:
- No longer need to call setRefCount() / decRefCount()
- Restore old ThreadBlockingQueue using std::deque, for std::shared_ptr correct behaviour.
2017-05-24 12:28:37 +02:00
vsonnier
8776908340 Fixes #546, when MTU > nb samples per-frame, overflow management was wrong. 2017-05-23 11:09:29 +02:00
vsonnier
5797548739 SoapySDRThread tweak: directly resize to the final size when building SDRThreadIQData 2017-05-23 11:09:28 +02:00
vsonnier
af20f680a4 Clearer ThreadBlockingQueue impl by using a field to hold size... 2017-05-21 21:04:12 +02:00
vsonnier
41c7dd231b Fix tabs introduced in latest commits... 2017-05-21 10:03:21 +02:00
vsonnier
e0af609224 Use a circular buffer for ThreadBlockingQueue (allocation-free) 2017-05-21 09:39:29 +02:00
vsonnier
fc2716518d SoapySDRThread: more comments about the relation between MTU and sample rate 2017-05-21 09:20:41 +02:00
vsonnier
c1fef72103 Use more a reliable time source in Windows for the Timer class 2017-05-20 13:31:55 +02:00
vsonnier
a541e55ff6 SaopySDRThread simplified, (small) perf improvement: No longer use inpBuffer,
write to SDRThreadIQData->data directly.
2017-05-20 13:31:46 +02:00
Charles J. Cliffe
1bf7c22f00 Donation list update 2017-05-11 22:51:39 -04:00
Charles J. Cliffe
91fd255c86 Remove temporary windows SSB filtering solution 2017-04-20 21:19:55 -04:00
Charles J. Cliffe
21b2b3d191 MSVC serial fix-up 2017-04-20 20:41:03 -04:00
Charles J. Cliffe
f9dc1aeb32 Use the right function.. 2017-04-20 19:53:08 -04:00
Charles J. Cliffe
43a9150107 Fix rig control menu, add serial port detection and selection dialog 2017-04-20 19:40:09 -04:00
vsonnier
0a19686b51 Remove 'threadlocal' pedantic and very limited usage that is not supported on all platforms 2017-04-05 19:28:18 +02:00
vsonnier
c8cca67fc7 Bookmarks: fix for #525 item 2, other cleanups. 2017-04-01 19:38:08 +02:00
Charles J. Cliffe
f4d090e65b Tweaks for bookmark selection, activation and group renaming 2017-03-30 22:26:11 -04:00
Charles J. Cliffe
1529fe3306 Fix flip-flopping config path conflict when using alternate build name. 2017-03-21 19:30:36 -04:00
Charles J. Cliffe
ec10f2523e Some additional custom build opts; fix compile order issue on OSX; patch tuning label font glitch. 2017-03-20 20:20:17 -04:00
Charles J. Cliffe
38e41eb85e Groups now renamed like everything else; remove onRenameGroup dc 2017-03-16 23:23:21 -04:00
Charles J. Cliffe
243c744c0a Fix the label editing issue :) 2017-03-15 21:23:13 -04:00
vsonnier
772e24fdb3 Better comments on CF32 format coming out of SoapySDR 2017-03-10 19:12:54 +01:00
vsonnier
97639d1d09 BIG FIX: Truncated stream of incoming samples on 32 bit targets !
This one is a veryy old long standing bug I was look for. All 32 bit Windows builds
suffered indeed of corrupted sound defects in all circumstances (reported even on rtl-sdr.com coments)
that had no identifiable origin... Until now.
Given the fix, all 32 bit adress targets should be affected as well...
2017-03-08 22:52:20 +01:00
vsonnier
294713945a Bookmarks: a BookmarkEntry owns its DataNode, so free it in destructor 2017-03-07 18:30:33 +01:00
vsonnier
9726f0eec6 Bookmarks: no need to Delete a tree element when the next steps will take care of it 2017-03-06 19:51:27 +01:00
vsonnier
925203b4a5 Bookmarks (cont...) : more understanding, more comments, more fixes. NOW memory management should be clean... 2017-03-04 11:22:44 +01:00
vsonnier
7bab9588e1 Bookmarks: rollback delete item data procedures: reading wxWidgets labyrinthine code more carefully
item data is properly deleted by Delete or DeleteChildren. On the other hand, SetItemData simply overwrites the pointer,
so take care or releasing ressources there
2017-03-04 09:02:15 +01:00
vsonnier
b30f9e9bbb Bookmarks: assure proper recursive cleanup of ItemData for all levels of a tree item 2017-03-03 22:49:58 +01:00
vsonnier
aab899d63c Bookmarks fixes: try to cleanup Recent entries in order 2017-03-03 20:33:14 +01:00