Mercurial > repos > blastem
changeset 512:6800d30437c9
Increment sample pointer after reading a sample in VGM player
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Feb 2014 00:21:56 -0800 |
parents | 2c1679058727 |
children | 24ebabd89162 |
files | vgmplay.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vgmplay.c Thu Feb 06 22:18:19 2014 -0800 +++ b/vgmplay.c Fri Feb 07 00:21:56 2014 -0800 @@ -255,7 +255,12 @@ } else if (cmd >= CMD_YM2612_DAC && cmd < CMD_DAC_STREAM_SETUP) { if (seek_block) { ym_address_write_part1(&y_context, 0x2A); - ym_data_write(&y_context, seek_block->data[block_offset]); + ym_data_write(&y_context, seek_block->data[block_offset++]); + seek_offset++; + if (block_offset > seek_block->size) { + seek_block = seek_block->next; + block_offset = 0; + } } else { fputs("Encountered DAC write command but data seek pointer is invalid!\n", stderr); }