cee75c523b21375fb3f41d282d8f89ceadeb7625
- patchImportXml: handle the legacy single-patch format (JSYNTH_PATCH root) as its own top-level branch instead of incorrectly nested inside the modern per-child loop, which checked/decoded the outer xml on every iteration instead of the loop variable xml2. Switched its CC-table import to import_midi_cc, matching the convention already used (and exercised) by bankDecodeXml_legacy. loadPatchFromFile's .xmp branch now also accepts legacy-rooted files. - setCurrentProgramStateInformation: fix a related bug found in passing - it was passing patchImportXml an XML node one level too deep, making the VST2 "copy plugin state to another track" feature a complete no-op. - Fix the fundamentally broken fxb/fxp magic-number check: it compared raw file bytes (as text, e.g. "CcnK") against JUCE's int-to-decimal- text String constructor (e.g. "1130589771"), which can never match. This meant the entire opaque .fxb/.fxp load path was dead code. Fixed using ByteOrder::bigEndianInt, matching the pattern JUCE's own VST3 wrapper uses for the identical struct. "Regular" (non-chunk) .fxb/.fxp is still unsupported, but now shows an AlertWindow explaining why instead of silently doing nothing. - Implement .fxp/.fxb saving using the same opaque-chunk format the load path expects, reusing getCurrentProgramStateInformation/ getStateInformation for the payload. - Deduplicate patchDecodeXml/patchDecodeXml_legacy (the latter now just delegates to the former). Verified with clean debug/release builds and a standalone round-trip test of the binary format logic (magic detection, byte order, size/payload round-trip, safe rejection of truncated/bogus files). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dhtwRLARk4eiPngcQykLJ
Description
No description provided
90 MiB
Languages
C++
53.7%
C
36.8%
Makefile
4.1%
MATLAB
2.2%
Roff
1.6%
Other
1.6%