Skip to content

Commit

Permalink
YMF278B: fix glitch when end address is changed while sample is playing
Browse files Browse the repository at this point in the history
  • Loading branch information
ValleyBell committed Jan 4, 2017
1 parent 82da79f commit 9e434f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VGMPlay/chips/ymf278b.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ void ymf278b_pcm_update(UINT8 ChipID, stream_sample_t** outputs, int samples)
sl->sample1 = sl->sample2;

sl->sample2 = ymf278b_getSample(chip, sl);
if (sl->pos == sl->endaddr)
if (sl->pos >= sl->endaddr)
sl->pos = sl->pos - sl->endaddr + sl->loopaddr;
else
sl->pos ++;
Expand Down

0 comments on commit 9e434f3

Please sign in to comment.