vsonnier
030628c5ed
SDRPostThread is better using try_push, restore previous audio-related code in DemodulatorInstance
2017-09-02 16:24:25 +02:00
vsonnier
9bbcb582e3
Fix hang when the active demodulator goes out-of-bandwwidth by changing sample rate
2017-08-31 20:51:37 +02:00
vsonnier
3842cf087f
More terminate()-and-flush calls missed before
2017-08-29 18:48:59 +02:00
vsonnier
3f90cbb858
Flush queues on terminate() calls to unblock push()s and so ease threads termination
2017-08-28 20:53:21 +02:00
vsonnier
b52c4ac8a6
This lock is actually needed, restore it.
2017-08-27 13:35:11 +02:00
vsonnier
37712c7a81
Simplify SDRPostThread: no longer binding methods, directly use the true list of demodulators
2017-08-27 12:39:28 +02:00
vsonnier
a8f8f4a7e2
Initial commit: working...
2017-08-27 11:11:30 +02:00
vsonnier
c112026a2c
Make processing queues timed-push, to be able to escape deadlocks. Rollback 'restart device when blocked' that is ineffective in practice.
2017-08-26 23:34:48 +02:00
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
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
e67a29f5b6
Don't get stuck when closing application just because some Demodulators refuse to die
2017-08-12 11:30:32 +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
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
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
vsonnier
946a9801dc
FIX: Inactive demod bendwiths are restored to 0 from sessions, because they were erroneously saved as such.
...
The problem lies in DemodulatorPreThread:
- settings were actually get/set unprotected from concurrent access (bendwiths, frequencies, sample rates...etc) so make them atomic.
- If bandwith has changed, return the new value instead of the current one, just like frequencies.
2017-02-20 21:39:12 +01:00
vsonnier
051ebec49f
BLOCKING_QUEUE: let audio-out try_push() too, else it often blocks evrything while in debugger...
2017-02-18 10:15:47 +01:00
vsonnier
3ed65eff8e
BLOCKING_QUEUE: don't forget to cleanup if we try_push()
2017-02-15 20:27:57 +01:00
vsonnier
c7467a88bc
BLOCKING_QUEUE: prepare by raising up max queue lenghts
...
BLOCKING_QUEUE: Replaced ThreadQueue usage by ThreadBlockingQueue usage
BLOCKING_QUEUE: instrument all push() with timeouts, showed some call have to be non-blocking...
BLOCKING_QUEUE: tuned push()/try_push()
2017-02-14 18:42:05 +01:00
vsonnier
4609386648
COMMENTS,POLISHING: comments fenzy around VisualProcessor machinery,
...
make process() a true interface as strong hint for derived classes,
plus misc define added for understanding.
BUGFIX: FFTDataDistributor loses incoming samples when compacting internal buffers.
BUGFIX2: FFTDistributor: Frozen Waterfall if internal buffer is no bigger than fftSize
2017-02-05 12:41:43 +01:00
vsonnier
89cac5db88
FIX: wrong directive placement prevent building witout HAMLIB
2017-01-03 18:41:38 +01:00
Charles J. Cliffe
5c72b97309
Merge branch 'develop' into master
2017-01-02 21:22:13 -05:00
Charles J. Cliffe
3ec14fbe38
Licence fix, add SPDX-License-Identifier, remove unused code files
2017-01-02 21:07:43 -05:00
Charles J. Cliffe
020cef12c9
Recents list, DataTree rewindAll(), Bookmark view updates
2016-10-05 19:10:01 -04:00
Charles J. Cliffe
560caccbc7
Apply theme to bookmark panel, implement RGBA4f->wxColour operator
2016-09-29 21:57:23 -04:00
Charles J. Cliffe
003758b799
Improve active list integration/interactivity
2016-09-29 20:47:38 -04:00
Charles J. Cliffe
367a723947
Active modem tracking; update only when necessary
2016-09-22 20:40:07 -04:00
Charles J. Cliffe
bf7d67751e
Initial bookmark form, move demod data node load/save to demod mgr
2016-09-13 22:59:21 -04:00
Charles J. Cliffe
6ede20c3e8
Prevent solo-squelch focus from interrupting user actions; acts as temporary hold as well
2016-08-16 17:55:40 -04:00
vsonnier
0d50a2b241
SMALL_SQUELCH_CLEANUP: No need to DSP tricks to compute magnitude, sqrt() is free on desktop CPUs
2016-08-13 21:25:54 +02:00
Charles J. Cliffe
6a9e60efa9
Only use audio signal level for AM based modems
2016-08-13 14:50:20 -04:00
Charles J. Cliffe
9f5c674646
Make sure squelch lock is released on de-activate too
2016-08-13 14:18:41 -04:00
Charles J. Cliffe
2bbae7209f
Solo squelch break focus lock/tweak
2016-08-12 22:58:33 -04:00
Charles J. Cliffe
6ea2b5b8e8
More squelch tweaks; include I/Q dB and compare to audio for peak
2016-08-12 21:34:34 -04:00
Charles J. Cliffe
606d41bc30
Make audio the signal level instead of I/Q.. Fix attack/decay base to sample time.
2016-08-12 20:31:20 -04:00
Charles J. Cliffe
dedac01709
Moving signal ceil/floor for squelch
2016-08-10 14:02:25 -04:00
vsonnier
11ed2bd20b
MODEMARGINFOLIST crash: fixed by removing 'ModemArgInfoList newModemArgs' from AppFrame, actually not needed
2016-07-28 16:46:18 +02:00
Charles J. Cliffe
0f5b891b20
Fix Digital scope
2016-07-24 17:24:29 -04:00
Charles J. Cliffe
0090838070
Make modemFactories function ref vs. instances which carry other dsp kit stuff
2016-07-24 15:25:17 -04:00
vsonnier
21c8a81c32
TH_CLEAN_3.5: push() cleanup side of things, assure SDRThread::readStream() to actually check for full + make ThreadQueue notify even in case on not-successfull push(), make it spam notify_all() everytime
2016-07-08 23:30:15 +02:00
vsonnier
b495b388c9
TH_CLEAN_3: Use of non-blocking try_pop() when possible,
...
AudioThread concurrent access hardening and simplified,
and misc.
2016-07-05 21:45:42 +02:00
vsonnier
567d84711f
THREAD_CLEAN_PART2: Assure correct terminate()/isTerminated(delay)/delete sequence +
...
Removed the NotifyQueue between DemodulatorInstance participants, actually not needed
since DemodulatorInstance::IsTerminated() is explicitly called on some events for cleanups
DELETE_CLEANUP: properly nullify deleted pointers when needed
2016-07-03 14:22:41 +02:00
vsonnier
52de909cfb
THREAD_CLEAN: Clearly distinguish between a request to stop by terminate() from the actual termination isTerminated()
2016-06-28 22:16:34 +02:00