summaryrefslogtreecommitdiff
path: root/ym2612.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-06-03 21:43:38 -0700
committerMike Pavone <pavone@retrodev.com>2013-06-03 21:43:38 -0700
commit8bd4d9e1e46a0e4277e61a7c999de9423df8ef92 (patch)
treeef5cb2916d075c81df0f9e211aa369ae6e3d5d4f /ym2612.h
parent46b12a3e87fbe5608da7e4766114b9ccbc3c2f1c (diff)
Make the PSG and YM2612 use the master clock internal with an increment based on clock divider so that they stay perflectly in sync. Run both the PSG and YM2612 whenver one of them needs to be run.
Diffstat (limited to 'ym2612.h')
-rw-r--r--ym2612.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ym2612.h b/ym2612.h
index 7c74336..e4b235c 100644
--- a/ym2612.h
+++ b/ym2612.h
@@ -39,6 +39,7 @@ typedef struct {
int16_t *back_buffer;
double buffer_fraction;
double buffer_inc;
+ uint32_t clock_inc;
uint32_t buffer_pos;
uint32_t sample_limit;
uint32_t current_cycle;
@@ -59,7 +60,7 @@ typedef struct {
uint8_t selected_part;
} ym2612_context;
-void ym_init(ym2612_context * context, uint32_t sample_rate, uint32_t clock_rate, uint32_t sample_limit);
+void ym_init(ym2612_context * context, uint32_t sample_rate, uint32_t master_clock, uint32_t clock_div, uint32_t sample_limit);
void ym_run(ym2612_context * context, uint32_t to_cycle);
void ym_address_write_part1(ym2612_context * context, uint8_t address);
void ym_address_write_part2(ym2612_context * context, uint8_t address);