-
Notifications
You must be signed in to change notification settings - Fork 14
Description
This is not an actual "issue", but an alternative idea about hot-reloading. I do it this way, so I thought I'd share it 🙂
Unlike CPLUG, I don't have any hot-reloading logic or code in my plugin. My plugin doesn't build an extra DLL that I then hot-reload.
Instead, I have a simple extra app/plugin called "LiveReload". It's a simple plugin host. It hosts my VST3 plugin, and monitors my plugin's .vst3 DLL/bundle for changes. So while LiveReload is running, whenever I rebuild my plugin, LiveReload notices the change, saves my plugin's state, reloads my plugin DLL, and restores its state. A plugin is already a DLL, so we don't need "another layer of DLL" to do hot-reloading.
LiveReload can itself run as a plugin in a DAW. It's just a wrapper. So you can hot-reload while running a DAW with debugger attached.
This way, you don't need the live-reloading code and build steps in each individual plugin. Or worry about disabling it in release builds, etc. You just put it into one generic LiveReload app, done.
Right now, I made my LiveReload app/plugin using JUCE, because I didn't want to write a VST3 host from scratch. But if we only want it to host CPLUG plugins (not any VST3), then it could use the more simple CPLUG API (not VST3), and LiveReload itself could be made with CPLUG, not JUCE.
Anyway, LiveReload can be under GPL (if needed by JUCE) because your actual plugin doesn't use its code, and you never ship LiveReload to users. It's just a development tool.
I can share my LiveReload code/project if you're interested. I just don't quite have it in a form to make a public Github repo yet.