OpenALStream: Fix sample conversion.

Looks like it wasn't symmetric anymore.
This commit is contained in:
Jules Blok 2015-06-25 12:42:41 +02:00
parent 8fd5f249fa
commit 86dd81cf6b

View File

@ -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);
}