diff options
Diffstat (limited to 'audio/nosefart/files/patch-src_sndhrdw_nes__apu.c')
-rw-r--r-- | audio/nosefart/files/patch-src_sndhrdw_nes__apu.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/audio/nosefart/files/patch-src_sndhrdw_nes__apu.c b/audio/nosefart/files/patch-src_sndhrdw_nes__apu.c new file mode 100644 index 000000000000..0f6c08660923 --- /dev/null +++ b/audio/nosefart/files/patch-src_sndhrdw_nes__apu.c @@ -0,0 +1,25 @@ +--- src/sndhrdw/nes_apu.c.orig 2003-05-04 18:39:04 UTC ++++ src/sndhrdw/nes_apu.c +@@ -980,6 +980,9 @@ void apu_process(void *buffer, int num_s + uint32 elapsed_cycles; + static int32 prev_sample = 0; + int32 next_sample, accum; ++ uint8 *buff_u8 = (uint8 *)buffer; ++ int16 *buff_16 = (int16 *)buffer; ++ + + ASSERT(apu); + +@@ -1035,9 +1038,9 @@ void apu_process(void *buffer, int num_s + + /* signed 16-bit output, unsigned 8-bit */ + if (16 == apu->sample_bits) +- *((int16 *) buffer)++ = (int16) accum; +- else +- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80; ++ *buff_16++ = (int16) accum; ++ else ++ *buff_u8++ = (accum >> 8) ^0x80; + } + + /* resync cycle counter */ |