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

Make xmp_set_position consistently clear pattern break/jump vars #169

Merged
merged 1 commit into from Oct 27, 2020

Conversation

AliceLR
Copy link
Contributor

@AliceLR AliceLR commented May 24, 2020

Currently, xmp_set_position/xmp_next_position/et al. do not consistently clear the pattern break and jump variables in the player flow struct, meaning if these functions are called between this effect being used and the next row playing, the first row of the position set by xmp_set_position/etc. will play and then the pattern break or pattern jump will immediately take effect. Believe it or not, this was actually causing an audio bug in a MegaZeux game due to some unfortunate timing.

This patch simply makes these functions clear the relevant pattern flow variables whenever the player position is modified. It might also be necessary to clear f->loop_chn and f->rowdelay (not entirely sure).

sezero pushed a commit to sezero/libxmp that referenced this pull request Oct 22, 2020
@sezero
Copy link
Collaborator

sezero commented Oct 27, 2020

No one else commented on this one. @AliceLR: this is well-tested, yes?

@AliceLR
Copy link
Contributor Author

AliceLR commented Oct 27, 2020

Yes. I need to look into whether or not f->loop_chn and f->rowdelay (or anything else) might need to be cleared but if necessary I can make another patch for those.

@sezero sezero merged commit 7dd4fe8 into libxmp:master Oct 27, 2020
@sezero
Copy link
Collaborator

sezero commented Oct 27, 2020

Yes.

OK then, merged.

I need to look into whether or not f->loop_chn and f->rowdelay (or anything else) might need to be cleared but if necessary I can make another patch for those.

Yes, another patch would be better

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

Successfully merging this pull request may close these issues.

None yet

2 participants