summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/OpenALStream.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2015-06-27 00:13:02 +0200
committerJules Blok <jules.blok@gmail.com>2015-06-27 00:13:02 +0200
commita71e81a1435e91e3d807bc5f13b674bc9e6d7ed9 (patch)
treef0c5ffe031833966ccda1d68c894a431833d249f /Source/Core/AudioCommon/OpenALStream.cpp
parentcff6d9f9221a365c7957e4b91003600d657f0977 (diff)
parent86dd81cf6b56203c3674d8fde5c1d52f21652b93 (diff)
Merge pull request #2659 from Armada651/openal-conv
OpenALStream: Fix sample conversion.
Diffstat (limited to 'Source/Core/AudioCommon/OpenALStream.cpp')
-rw-r--r--Source/Core/AudioCommon/OpenALStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp
index 1446b2c22b..66c7caf49a 100644
--- a/Source/Core/AudioCommon/OpenALStream.cpp
+++ b/Source/Core/AudioCommon/OpenALStream.cpp
@@ -295,7 +295,7 @@ void OpenALStream::SoundLoop()
// Convert the samples from float to short
short stereo[OAL_MAX_SAMPLES * STEREO_CHANNELS * OAL_MAX_BUFFERS];
for (u32 i = 0; i < nSamples * STEREO_CHANNELS; ++i)
- stereo[i] = (short)((float)sampleBuffer[i] * (1 << 16));
+ stereo[i] = (short)((float)sampleBuffer[i] * (1 << 15));
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_STEREO16, stereo, nSamples * FRAME_STEREO_SHORT, ulFrequency);
}