summaryrefslogtreecommitdiff
path: root/psg.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-10-26 22:38:47 -0700
committerMike Pavone <pavone@retrodev.com>2013-10-26 22:38:47 -0700
commit7e61eaa7225bf025af42f88d0598aff8412f4144 (patch)
treebd19c2e555fc997065eba51715459185db566878 /psg.h
parent4788b58c7290ad4a4a161d6bc69bc184acc2ef66 (diff)
parentb8dc9d69563379341f127af571b4bec1312f4ca0 (diff)
Update opengl branch from default. Fix build breakage unrelated to merge
--HG-- branch : opengl
Diffstat (limited to 'psg.h')
-rw-r--r--psg.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/psg.h b/psg.h
index 295a319..4cd4552 100644
--- a/psg.h
+++ b/psg.h
@@ -1,3 +1,8 @@
+/*
+ Copyright 2013 Michael Pavone
+ 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 PSG_CONTEXT_H_
#define PSG_CONTEXT_H_
@@ -6,11 +11,12 @@
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 buffer_pos;
uint32_t clock_inc;
uint32_t cycles;
+ uint32_t sample_rate;
uint32_t samples_frame;
uint16_t lsfr;
uint16_t counter_load[4];
@@ -25,6 +31,7 @@ typedef struct {
void psg_init(psg_context * context, uint32_t sample_rate, uint32_t master_clock, uint32_t clock_div, uint32_t samples_frame);
+void psg_adjust_master_clock(psg_context * context, uint32_t master_clock);
void psg_write(psg_context * context, uint8_t value);
void psg_run(psg_context * context, uint32_t cycles);