ref: db14899b3e83712f18d8723bc30db3f0e35b58ed
parent: 670f49db779619fdd28c1724e2e9b03026001e8f
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Apr 17 14:34:26 EDT 2020
Try to fix Wii U audio hang part 2 I encountered a hang earlier, so the previous attempt obviously didn't work.
--- a/src/Backends/Audio/WiiU.cpp
+++ b/src/Backends/Audio/WiiU.cpp
@@ -174,8 +174,7 @@
AXVoiceVeData vol = {.volume = sound->volume};
AXSetVoiceVe(voice, &vol);
- AXVoiceDeviceMixData mix_data[1][6];
- memset(mix_data, 0, sizeof(mix_data));
+ static AXVoiceDeviceMixData mix_data[1][6];
mix_data[0][0].bus[0].volume = sound->pan_l;
mix_data[0][1].bus[0].volume = sound->pan_r;
@@ -252,8 +251,7 @@
sound->pan_l = (unsigned short)(0x8000 * MillibelToScale(-pan));
sound->pan_r = (unsigned short)(0x8000 * MillibelToScale(pan));
- AXVoiceDeviceMixData mix_data[1][6];
- memset(mix_data, 0, sizeof(mix_data));
+ static AXVoiceDeviceMixData mix_data[1][6];
mix_data[0][0].bus[0].volume = sound->pan_l;
mix_data[0][1].bus[0].volume = sound->pan_r;