aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2021-08-08 15:45:44 +0200
committerArisotura <thetotalworm@gmail.com>2021-08-08 15:45:44 +0200
commitd5a20ad3c85ca09679fdc83feb3814785d1187cf (patch)
treeb6229db6ab6768dcb16f57a3aaeb68eb10ff274c /src
parentc7325469c23fc1625affd14f7855c520094a44e1 (diff)
tidbits
Diffstat (limited to 'src')
-rw-r--r--src/frontend/qt_sdl/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp
index 927d9ea..d8eca58 100644
--- a/src/frontend/qt_sdl/main.cpp
+++ b/src/frontend/qt_sdl/main.cpp
@@ -208,7 +208,7 @@ void micLoadWav(const char* name)
for (int i = 0; i < micWavLength; i++)
{
- u16 val;
+ u16 val = 0;
switch (SDL_AUDIO_BITSIZE(format.format))
{
@@ -228,9 +228,9 @@ void micLoadWav(const char* name)
{
u32 rawval;
if (SDL_AUDIO_ISBIGENDIAN(format.format))
- rawval = (buf[res_pos*4] << 24) | (buf[res_pos*4 + 1] << 16) | (buf[res_pos*4 + 2] << 8) | buf[res_pos * 4 + 3];
+ rawval = (buf[res_pos*4] << 24) | (buf[res_pos*4 + 1] << 16) | (buf[res_pos*4 + 2] << 8) | buf[res_pos*4 + 3];
else
- rawval = (buf[res_pos*4 + 3] << 24) | (buf[res_pos*4 + 2] << 16) | (buf[res_pos*4 + 1] << 8) | buf[res_pos * 4];
+ rawval = (buf[res_pos*4 + 3] << 24) | (buf[res_pos*4 + 2] << 16) | (buf[res_pos*4 + 1] << 8) | buf[res_pos*4];
float fval = *(float*)&rawval;
s32 ival = (s32)(fval * 0x8000);