G2.3: auto-reload instruments from state file after bridge respawn

This commit is contained in:
2026-08-16 07:33:14 +07:00
parent 28441566c2
commit 4faa5a3504
7 changed files with 130 additions and 1 deletions
@@ -65,6 +65,10 @@ public:
// call captureState() first (VST3 buffers are refreshed there). Non-VST
// engines: empty.
virtual std::string serializeState() const { return std::string(); }
// G2.3: replace the preset with a previously serialized one (VST3:
// base64 of [4B BE compLen][component][4B BE ctrlLen][controller]).
// Must be called after the instrument is loaded. Non-VST: no-op.
virtual void loadSerializedState(const std::string& /*base64*/) {}
// G2.1: last bank/program for a MIDI channel (SF2/SF3). Others: 0.
virtual uint32_t bankOf(uint32_t channel) const { return 0; }
virtual uint32_t programOf(uint32_t channel) const { return 0; }