Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when using ADLplug in OpenMPT #83

Open
brickblock369 opened this issue Dec 13, 2021 · 4 comments
Open

Problems when using ADLplug in OpenMPT #83

brickblock369 opened this issue Dec 13, 2021 · 4 comments

Comments

@brickblock369
Copy link

brickblock369 commented Dec 13, 2021

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.

@jpcima
Copy link
Owner

jpcima commented Dec 15, 2021

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

  1. host does NOT initialize processor (prepareToPlay not called)
  2. host restores state data (OK)
  3. host requests current state data (FAIL when not initialized at step 1, returns empty)
  4. 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.

Player *pl = player_.get();
if (!pl)
return;

All this is just guessing, but we can give a quick try.

@jpcima
Copy link
Owner

jpcima commented Dec 15, 2021

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.

@brickblock369
Copy link
Author

brickblock369 commented Dec 16, 2021

Ah, that version seems to fix it! Thanks!

@jpcima
Copy link
Owner

jpcima commented Dec 16, 2021

Great, thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants