Skip to content

Commit

Permalink
Fix position jump after E60
Browse files Browse the repository at this point in the history
The B command jumps to the beginning of a new pattern, irrespective
of any previous E60 command that might have been issued. Verified
with MilkyTracker and OpenMPT.

The attached test file should play two beeps, and plays only one
beep before this PR is applied.

Co-developed with @bryc who also prepared the testcase.
  • Loading branch information
rasky committed Apr 16, 2021
1 parent fc87ef4 commit 5c2bcf2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/play.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ static void xm_handle_note_and_instrument(xm_context_t* ctx, xm_channel_context_
if(s->effect_param < ctx->module.length) {
ctx->position_jump = true;
ctx->jump_dest = s->effect_param;
ctx->jump_row = 0;
}
break;

Expand Down
Binary file added tests/pos_jump.xm
Binary file not shown.

0 comments on commit 5c2bcf2

Please sign in to comment.