From affdf08fd6e831f93f0b5d1e43ecd96765c2b32b Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 20 Nov 2012 09:49:27 +0100 Subject: [PATCH] Real fix for the crashes on Windows with AXWii --- Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h index d160b83c0f..16df07e8a4 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h @@ -36,6 +36,10 @@ # define PB_TYPE AXPBWii #endif +// Put all of that in an anonymous namespace to avoid stupid compilers merging +// functions from AX GC and AX Wii. +namespace { + // Useful macro to convert xxx_hi + xxx_lo to xxx for 32 bits. #define HILO_TO_32(name) \ ((name##_hi << 16) | name##_lo) @@ -242,7 +246,7 @@ inline void GetInputSamples(PB_TYPE& pb, s16* samples) if (ratio > 0x00100000) ratio = 0x00100000; - s16 real_samples[1026]; + s16 real_samples[514]; u32 real_samples_needed = (32 * ratio + curr_pos) >> 16; // The first two real samples are the ones we read at the previous @@ -384,4 +388,6 @@ void Process1ms(PB_TYPE& pb, const AXBuffers& buffers, AXMixControl mctrl) } } +} // namespace + #endif // !_UCODE_AX_VOICE_H