aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authortwinaphex2018-12-28 08:02:34 +0100
committertwinaphex2018-12-28 08:02:34 +0100
commit43d95f6f0d0ec204542699ae81fe7367ea7943d4 (patch)
tree2467fc8532d8dcc0aab2c12c58c82712bddceef1 /source
parent6d4cad819e168ace7a51abf88f21578dfc599d37 (diff)
downloadsnesemu-43d95f6f0d0ec204542699ae81fe7367ea7943d4.tar.gz
snesemu-43d95f6f0d0ec204542699ae81fe7367ea7943d4.tar.bz2
snesemu-43d95f6f0d0ec204542699ae81fe7367ea7943d4.zip
C89 buildfix
Diffstat (limited to 'source')
-rw-r--r--source/apu_blargg.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/apu_blargg.c b/source/apu_blargg.c
index 2976580..20b8b50 100644
--- a/source/apu_blargg.c
+++ b/source/apu_blargg.c
@@ -2934,6 +2934,9 @@ static void resampler_time_ratio(double ratio)
static void resampler_read(int16_t *data, int32_t num_samples)
{
+ int32_t i_position, o_position, consumed;
+ int16_t *internal_buffer;
+
if (r_step == 65536)
{
//direct copy if we are not resampling
@@ -2962,9 +2965,6 @@ static void resampler_read(int16_t *data, int32_t num_samples)
return;
}
- int32_t i_position, o_position, consumed;
- int16_t *internal_buffer;
-
i_position = rb_start >> 1;
internal_buffer = (int16_t *)rb_buffer;
o_position = 0;
@@ -3296,8 +3296,7 @@ bool S9xInitAPU()
/* unpack cycle table */
for ( i = 0; i < 128; i++ )
{
- int32_t n;
- n = cycle_table [i];
+ int32_t n = cycle_table [i];
m.cycle_table [i * 2 + 0] = n >> 4;
m.cycle_table [i * 2 + 1] = n & 0x0F;
}