aboutsummaryrefslogtreecommitdiff
path: root/source/soundux.h
diff options
context:
space:
mode:
authorNebuleon Fumika2013-01-19 20:28:17 -0500
committerNebuleon Fumika2013-01-19 20:28:17 -0500
commit88135c52f8367549d6c864df193018f5a6cb2b35 (patch)
tree57ae06a89349f86544f00060adbf2cdc396a8374 /source/soundux.h
parent2bb2ee8c0aee044998858ff8263be71cb908a663 (diff)
downloadsnes9x2005-88135c52f8367549d6c864df193018f5a6cb2b35.tar.gz
snes9x2005-88135c52f8367549d6c864df193018f5a6cb2b35.tar.bz2
snes9x2005-88135c52f8367549d6c864df193018f5a6cb2b35.zip
Remove unneeded volatility, enabling more optimisations. Sound volatility is #define'd away, GUI volatility is simply removed.
Diffstat (limited to 'source/soundux.h')
-rw-r--r--source/soundux.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/soundux.h b/source/soundux.h
index ad8cba1..8fb8396 100644
--- a/source/soundux.h
+++ b/source/soundux.h
@@ -144,7 +144,14 @@ typedef struct {
uint32 err_rate;
} SoundStatus;
+// Define NO_VOLATILE_SOUND if you're always reading or writing sound from one
+// thread or one co-routine. If you're using interrupts or a thread, sound must
+// be volatile.
+#ifndef NO_VOLATILE_SOUND
EXTERN_C volatile SoundStatus so;
+#else
+EXTERN_C SoundStatus so;
+#endif
typedef struct {
int state;