Skip to content

Commit

Permalink
Fix Mx and Px effects using the MT documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Artefact2 committed Jan 8, 2015
1 parent 73ac33b commit 69a5e8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/play.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,15 @@ static void xm_handle_note_and_instrument(xm_context_t* ctx, xm_channel_context_
break;

case 0xC: /* Set panning */
ch->panning = (float)(s->volume_column - 0xC0) / (float)0xF;
ch->panning = (float)(
((s->volume_column & 0x0F) << 4) | (s->volume_column & 0x0F)
) / (float)0xFF;
break;

case 0xF: /* Tone portamento */
if(s->volume_column & 0x0F) {
ch->tone_portamento_param = s->volume_column;
ch->tone_portamento_param = ((s->volume_column & 0x0F) << 4)
| (s->volume_column & 0x0F);
}
break;

Expand Down
Binary file modified tests/tone-portamento.xm
Binary file not shown.

0 comments on commit 69a5e8a

Please sign in to comment.