diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-10-01 23:51:16 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-10-01 23:51:16 -0700 |
commit | c4e2e0114cdc1871e959c67d0f15be99bef3459c (patch) | |
tree | 7d6216b4bba7c28c73d762f011c28239caa21253 /ym2612.h | |
parent | 5830e5828c4680aafe27210935dd3fed9ece0448 (diff) |
Implement turbo/slow motion feature that overclocks or underclocks the entire system at the push of a button
Diffstat (limited to 'ym2612.h')
-rw-r--r-- | ym2612.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,6 +1,6 @@ /* Copyright 2013 Michael Pavone - This file is part of BlastEm. + This file is part of BlastEm. BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. */ #ifndef YM2612_H_ @@ -59,10 +59,11 @@ typedef struct { typedef struct { int16_t *audio_buffer; int16_t *back_buffer; - double buffer_fraction; - double buffer_inc; + uint64_t buffer_fraction; + uint64_t buffer_inc; uint32_t clock_inc; uint32_t buffer_pos; + uint32_t sample_rate; uint32_t sample_limit; uint32_t current_cycle; uint32_t write_cycle; @@ -93,6 +94,7 @@ typedef struct { } ym2612_context; void ym_init(ym2612_context * context, uint32_t sample_rate, uint32_t master_clock, uint32_t clock_div, uint32_t sample_limit, uint32_t options); +void ym_adjust_master_clock(ym2612_context * context, uint32_t master_clock); 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); |