ADLplug
ADLplug copied to clipboard
Problems when using ADLplug in OpenMPT
The biggest problem I have when using ADLplug with OpenMPT is that when saving and closing OpenMPT, the customized patches don't get saved along with the MPT file, while the customized patches do seem to be retained in other project files when saved (FL Studio in my end).
Second, when I start playing the song in OpenMPT, occasionally the FM patch parameters get reverted to the previous revision's FM parameters, I'm not entirely sure how the patch parameters get saved upon playing it in OpenMPT.
There might be a defect in the save & load mechanism. That depends whether the host uses a weird sequence to interact with the plugin (I've never tried OpenMPT before).
following a quick examination of source code, the following sequence might create a problem
- host does NOT initialize processor (
prepareToPlay
not called) - host restores state data (OK)
- host requests current state data (FAIL when not initialized at step 1, returns empty)
- host restores state data again (FAIL, replacing
last_state_information_
with empty from step 3)
So I would think step 3 needs fixing at this location; the state data should be filled from previous state info from step 2.
https://github.com/jpcima/ADLplug/blob/a17a34a6bf23675d7598fc064f16a0e831bb628a/sources/plugin_processor.cc#L804-L806
All this is just guessing, but we can give a quick try.
https://ci.appveyor.com/project/jpcima/adlplug/builds/41901596
Retry one of these builds if you don't mind. Under one of the mingw 32 or 64-bit builds, artifacts tab.
Ah, that version seems to fix it! Thanks!
Great, thanks for the feedback.