- synthChanged() no longer builds JaySynthActionListener Strings and
calls sendActionMessage directly on the audio thread. It now pushes
a small POD event into a lock-free SPSC queue (JUCE's AbstractFifo),
drained by the existing 10ms UI timer on the message thread, which
does the String-building/posting there instead.
- VoiceProcessDataV's ~450KB-900KB of SYNTH_MAX_BUFSIZE-sized local
arrays are now persistent per-voice buffers allocated once in
VoiceSetBufsize (freed in VoiceFree), matching the pattern already
used for pBuf_Q and by vcf.c/env.c/lfo.c, instead of being
reallocated on the stack on every audio block.
- SynthDebug uses vsnprintf instead of vsprintf, bounding writes to
its 1024-byte buffer.
Verified with clean debug and release builds (no new warnings) and a
live playback smoke test in Reaper.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dhtwRLARk4eiPngcQykLJ
- handleController: bounds-check NRPN/CC controller ID before indexing
last_midiCC_info[] (NRPN IDs can reach 16383, array is sized 1024)
- JaySynthMidiCC::add/remove: also reject negative controller IDs coming
from patch/bank file data, not just out-of-range-high ones
- bankImportXml/loadPatchFromFile: null-check XML elements after
getFirstChildElement()/XmlDocument::parse() before dereferencing, so
malformed/truncated patch or bank files no longer crash on load
- loadBankFromFile/loadPatchFromFile: validate the loaded file is large
enough for the fxBank/fxProgram header, and that the embedded chunk
size fits within the file, before reading through the raw pointer
- processBlock/JaySynth::renderNextBlock: host blocks larger than
SYNTH_MAX_BUFSIZE no longer overflow the fixed-size stack work buffers
or deadlock the render worker threads; oversized blocks are now
rendered in multiple SYNTH_MAX_BUFSIZE-sized passes (pending MIDI
events are correctly held over between passes)
- JaySynth constructor: guard against createInputStream() returning null
when the wavetable file can't be opened
- JaySynth::setParameter/setControl/setPerVoiceControl/setParam/
ClearControls: take the synth's lock, matching renderNextBlock and the
note/controller handlers, to close a data race between parameter
changes (UI/host automation) and audio-thread rendering
Verified with a full rebuild (make) producing JaySynth.so with no new
warnings or errors.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dhtwRLARk4eiPngcQykLJ
- added ability to import patch file with midicc defined without patch parameter
- fixed notes cut off by calling getStateInformation()
- disabled limiter
- increased version to v1.1.0-pre