summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/nes_oscs.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/nes_oscs.h')
-rw-r--r--apps/codecs/libgme/nes_oscs.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/codecs/libgme/nes_oscs.h b/apps/codecs/libgme/nes_oscs.h
index fa6b8ab4b0..1eeb302e6c 100644
--- a/apps/codecs/libgme/nes_oscs.h
+++ b/apps/codecs/libgme/nes_oscs.h
@@ -46,7 +46,7 @@ enum { shift_mask = 0x07 };
46enum { square_phase_range = 8 }; 46enum { square_phase_range = 8 };
47 47
48typedef struct Blip_Synth Synth; 48typedef struct Blip_Synth Synth;
49 49
50struct Nes_Square 50struct Nes_Square
51{ 51{
52 struct Nes_Osc osc; 52 struct Nes_Osc osc;
@@ -54,12 +54,12 @@ struct Nes_Square
54 int env_delay; 54 int env_delay;
55 int phase; 55 int phase;
56 int sweep_delay; 56 int sweep_delay;
57 57
58 Synth* synth; // shared between squares 58 Synth* synth; // shared between squares
59}; 59};
60 60
61static inline void Square_set_synth( struct Nes_Square* this, Synth* s ) { this->synth = s; } 61static inline void Square_set_synth( struct Nes_Square* this, Synth* s ) { this->synth = s; }
62 62
63void Square_clock_sweep( struct Nes_Square* this, int adjust ); 63void Square_clock_sweep( struct Nes_Square* this, int adjust );
64void Square_run( struct Nes_Square* this, nes_time_t, nes_time_t ); 64void Square_run( struct Nes_Square* this, nes_time_t, nes_time_t );
65 65
@@ -73,15 +73,15 @@ static inline void Square_reset( struct Nes_Square* this )
73 73
74void Square_clock_envelope( struct Nes_Square* this ); 74void Square_clock_envelope( struct Nes_Square* this );
75int Square_volume( struct Nes_Square* this ); 75int Square_volume( struct Nes_Square* this );
76 76
77// Nes_Triangle 77// Nes_Triangle
78 78
79enum { Triangle_phase_range = 16 }; 79enum { Triangle_phase_range = 16 };
80 80
81struct Nes_Triangle 81struct Nes_Triangle
82{ 82{
83 struct Nes_Osc osc; 83 struct Nes_Osc osc;
84 84
85 int phase; 85 int phase;
86 int linear_counter; 86 int linear_counter;
87 struct Blip_Synth synth; 87 struct Blip_Synth synth;
@@ -123,11 +123,11 @@ static inline void Noise_reset( struct Nes_Noise* this )
123// Nes_Dmc 123// Nes_Dmc
124 124
125enum { loop_flag = 0x40 }; 125enum { loop_flag = 0x40 };
126 126
127struct Nes_Dmc 127struct Nes_Dmc
128{ 128{
129 struct Nes_Osc osc; 129 struct Nes_Osc osc;
130 130
131 int address; // address of next byte to read 131 int address; // address of next byte to read
132 int period; 132 int period;
133 int buf; 133 int buf;
@@ -144,7 +144,7 @@ struct Nes_Dmc
144 bool pal_mode; 144 bool pal_mode;
145 bool nonlinear; 145 bool nonlinear;
146 146
147 int (*prg_reader)( void*, addr_t ); // needs to be initialized to prg read function 147 int (*prg_reader)( void*, int ); // needs to be initialized to prg read function
148 void* prg_reader_data; 148 void* prg_reader_data;
149 149
150 struct Nes_Apu* apu; 150 struct Nes_Apu* apu;