comparison vgmplay.c @ 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 f66c78cbdcaa
comparison
equal deleted inserted replaced
511:2c1679058727 512:6800d30437c9
253 wait_time *= mclks_sample; 253 wait_time *= mclks_sample;
254 wait(&y_context, &p_context, &current_cycle, wait_time); 254 wait(&y_context, &p_context, &current_cycle, wait_time);
255 } else if (cmd >= CMD_YM2612_DAC && cmd < CMD_DAC_STREAM_SETUP) { 255 } else if (cmd >= CMD_YM2612_DAC && cmd < CMD_DAC_STREAM_SETUP) {
256 if (seek_block) { 256 if (seek_block) {
257 ym_address_write_part1(&y_context, 0x2A); 257 ym_address_write_part1(&y_context, 0x2A);
258 ym_data_write(&y_context, seek_block->data[block_offset]); 258 ym_data_write(&y_context, seek_block->data[block_offset++]);
259 seek_offset++;
260 if (block_offset > seek_block->size) {
261 seek_block = seek_block->next;
262 block_offset = 0;
263 }
259 } else { 264 } else {
260 fputs("Encountered DAC write command but data seek pointer is invalid!\n", stderr); 265 fputs("Encountered DAC write command but data seek pointer is invalid!\n", stderr);
261 } 266 }
262 uint32_t wait_time = (cmd & 0xF); 267 uint32_t wait_time = (cmd & 0xF);
263 if (wait_time) 268 if (wait_time)