avoid lvalue cast
This commit is contained in:
parent
0cbdf34f7d
commit
752b6aabc9
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_linux_main_linux_c,v 1.1.1.1 2005/03/08 14:36:26 niallo Exp $
|
||||
--- src/linux/main_linux.c.orig Fri Mar 4 10:57:15 2005
|
||||
+++ src/linux/main_linux.c Fri Mar 4 10:57:46 2005
|
||||
$OpenBSD: patch-src_linux_main_linux_c,v 1.2 2010/05/20 09:55:22 espie Exp $
|
||||
--- src/linux/main_linux.c.orig Sun May 2 01:53:54 2004
|
||||
+++ src/linux/main_linux.c Wed May 19 19:22:49 2010
|
||||
@@ -17,8 +17,9 @@ UNIX systems */
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
@ -12,7 +12,7 @@ $OpenBSD: patch-src_linux_main_linux_c,v 1.1.1.1 2005/03/08 14:36:26 niallo Exp
|
||||
|
||||
#include "types.h"
|
||||
#include "nsf.h"
|
||||
@@ -223,7 +224,7 @@ static void open_hardware(const char *de
|
||||
@@ -223,7 +224,7 @@ static void open_hardware(const char *device)
|
||||
doesn't show up as a char device. The original author (Matthew Conte) seems
|
||||
to have thought that esddsp should work without this hack. Is doing this
|
||||
bad? --Matthew Strait */
|
||||
|
21
audio/nosefart/patches/patch-src_sndhrdw_nes_apu_c
Normal file
21
audio/nosefart/patches/patch-src_sndhrdw_nes_apu_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-src_sndhrdw_nes_apu_c,v 1.1 2010/05/20 09:55:22 espie Exp $
|
||||
--- src/sndhrdw/nes_apu.c.orig Thu May 20 11:53:26 2010
|
||||
+++ src/sndhrdw/nes_apu.c Thu May 20 11:54:17 2010
|
||||
@@ -1034,10 +1034,13 @@ void apu_process(void *buffer, int num_samples)
|
||||
accum = -0x8000;
|
||||
|
||||
/* signed 16-bit output, unsigned 8-bit */
|
||||
- if (16 == apu->sample_bits)
|
||||
- *((int16 *) buffer)++ = (int16) accum;
|
||||
- else
|
||||
- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
|
||||
+ if (16 == apu->sample_bits) {
|
||||
+ *((int16 *) buffer) = (int16) accum;
|
||||
+ buffer = (int16 *)buffer + 1;
|
||||
+ } else {
|
||||
+ *((uint8 *) buffer) = (accum >> 8) ^ 0x80;
|
||||
+ buffer = (uint8 *)buffer + 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* resync cycle counter */
|
Loading…
x
Reference in New Issue
Block a user