-
GUI thread
- editing (Actions)
- Observer messages
-
PeakThread
-
in/out signal chains having their own threads
SongRenderer
might become multi-threaded...
-
Observer messages from other threads must be forwarded via
hui::run_later()
-
PeakThread
locks Song (write,try) -
MidiPreview
locks self -
ViewModeCapture.draw_post()
locksAudio/MidiAccumulator.buf
-
PerformanceMonitor
locks self -
FFT locks planner
-
SignalChain
...send-to-modules locks self -
SongRenderer
locks Song (read) -
Audio/MidiAccumulator.suck()
locks buf -
hui::runner
... locks self -
Actions
lockSong
(write) -
RingBuffer.clear()
locks buf (....) -
SongRenderer
configuration (allow_layers
set_pos
etc) don't lock, instead they buffer the values and the lockedread()
will really update
???
Song.StructureReader
RingBuffer
- safe for single consumer + single producer
OutputStream.paused
AudioSucker.running
RingBuffer
- reading/writing: locks before and after, but not during mem access still safe because of these locks
InputStreamAudio
sends in main threadInputStreamMidi
sends in main thread (well, does not send at all...)OutputStream
sends in main thread, but needs to be controlled from main thread
- Song owned by main thread -> can always read, needs to lock for writing (only through actions) ** other threads only allowed to read when locking. Can not directly edit