diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libjin/Audio/SDL/SDLSource.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libjin/Audio/SDL/SDLSource.cpp b/src/libjin/Audio/SDL/SDLSource.cpp index 251ef27..9f4f2fb 100644 --- a/src/libjin/Audio/SDL/SDLSource.cpp +++ b/src/libjin/Audio/SDL/SDLSource.cpp @@ -290,21 +290,21 @@ Manager::get()->pushCommand(cmd); \ for (int i = 0; i < samples; ++i) { char* source = (char*)raw.data + status.pos * (raw.bitdepth / 8) * raw.channels; - short left = 0; - short right = 0; + short l = 0; + short r = 0; if (raw.bitdepth == 16) { - left = ((short*)source)[L] * status.volume; - right = ((short*)source)[L + raw.channels - 1] * status.volume; + l = ((short*)source)[L] * status.volume; + r = ((short*)source)[L + raw.channels - 1] * status.volume; } else if (raw.bitdepth == 8) { - left = source[L] << 8; // << 8 Ŵ16bits - right = source[L + raw.channels - 1] << 8; + l = source[L] << 8; // << 8 Ŵ16bits + r = source[L + raw.channels - 1] << 8; } short* sample = buffer + (i << 1); - sample[L] = clamp(sample[L] + left, SHRT_MIN, SHRT_MAX); // - sample[R] = clamp(sample[R] + right, SHRT_MIN, SHRT_MAX); // + sample[L] = clamp(sample[L] + l, SHRT_MIN, SHRT_MAX); // + sample[R] = clamp(sample[R] + r, SHRT_MIN, SHRT_MAX); // ++status.pos; if (status.pos > raw.samples && status.loop) status.pos = 0; // rewind |