comparison ym2612.c @ 505:b7b7a1cab44a

The local clone on my laptop got messed up and some changes had not been pushed. This commit represents the status of the working copy from that clone. It unfortunately contains some changes that I did not intend to commit yet, but this seems like the best option at the moment.
author Michael Pavone <pavone@retrodev.com>
date Mon, 06 Jan 2014 22:54:05 -0800
parents 3e1573fa22cf
children 24ebabd89162
comparison
equal deleted inserted replaced
504:7b0df1aaf384 505:b7b7a1cab44a
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include "ym2612.h" 10 #include "ym2612.h"
11 #include "render.h" 11 #include "render.h"
12 #include "wave.h" 12 #include "wave.h"
13 #include "blastem.h"
13 14
14 //#define DO_DEBUG_PRINT 15 //#define DO_DEBUG_PRINT
15 #ifdef DO_DEBUG_PRINT 16 #ifdef DO_DEBUG_PRINT
16 #define dfprintf fprintf 17 #define dfprintf fprintf
17 #define dfopen(var, fname, mode) var=fopen(fname, mode) 18 #define dfopen(var, fname, mode) var=fopen(fname, mode)
480 context->audio_buffer[context->buffer_pos+1] += value / YM_VOLUME_DIVIDER; 481 context->audio_buffer[context->buffer_pos+1] += value / YM_VOLUME_DIVIDER;
481 } 482 }
482 } 483 }
483 context->buffer_pos += 2; 484 context->buffer_pos += 2;
484 if (context->buffer_pos == context->sample_limit) { 485 if (context->buffer_pos == context->sample_limit) {
485 render_wait_ym(context); 486 if (!headless) {
487 render_wait_ym(context);
488 }
486 } 489 }
487 } 490 }
488 } 491 }
489 if (context->current_cycle >= context->write_cycle + (BUSY_CYCLES * context->clock_inc / 6)) { 492 if (context->current_cycle >= context->write_cycle + (BUSY_CYCLES * context->clock_inc / 6)) {
490 context->status &= 0x7F; 493 context->status &= 0x7F;