From 34c9a4743597f50c474de82ac41778ca53b6f9b8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 17 Jun 2014 23:11:19 -0700 Subject: [PATCH] Fix some typos --- src/sound/oalsdlsound.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sound/oalsdlsound.cpp b/src/sound/oalsdlsound.cpp index 6ef7d9118..7aa857452 100644 --- a/src/sound/oalsdlsound.cpp +++ b/src/sound/oalsdlsound.cpp @@ -326,7 +326,7 @@ void *OpenALSoundStream::GetData(size_t bytes) for(size_t i = 0;i < count;i++) { short smp = *samples; - *(samples++) = ((smp>>8)&0x00FF) | ((smp<<8)*0xFF00); + *(samples++) = ((smp>>8)&0x00FF) | ((smp<<8)&0xFF00); } } if(NeedS8Conv) @@ -410,7 +410,7 @@ bool OpenALSoundStream::InitSample() Format = AL_FORMAT_MONO16; else if(Sample->actual.channels == 2) Format = AL_FORMAT_STEREO16; - smpsize = 1 * Sample->actual.channels; + smpsize = 2 * Sample->actual.channels; } else if(Sample->actual.format == AUDIO_U16LSB || Sample->actual.format == AUDIO_U16MSB) { @@ -420,7 +420,7 @@ bool OpenALSoundStream::InitSample() Format = AL_FORMAT_MONO16; else if(Sample->actual.channels == 2) Format = AL_FORMAT_STEREO16; - smpsize = 1 * Sample->actual.channels; + smpsize = 2 * Sample->actual.channels; } if(Format == AL_NONE) @@ -570,7 +570,7 @@ void* Decoder::GetData(ALsizei *size) for(size_t i = 0;i < count;i++) { short smp = *samples; - *(samples++) = ((smp>>8)&0x00FF) | ((smp<<8)*0xFF00); + *(samples++) = ((smp>>8)&0x00FF) | ((smp<<8)&0xFF00); } }