diff --git a/src/raudio.c b/src/raudio.c index 177bdb5a..623984e1 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -1304,8 +1304,8 @@ float *LoadWaveSamples(Wave wave) for (unsigned int i = 0; i < wave.frameCount*wave.channels; i++) { - if (wave.sampleSize == 8) samples[i] = (float)(((unsigned char *)wave.data)[i] - 127)/256.0f; - else if (wave.sampleSize == 16) samples[i] = (float)(((short *)wave.data)[i])/32767.0f; + if (wave.sampleSize == 8) samples[i] = (float)(((unsigned char *)wave.data)[i] - 128)/128.0f; + else if (wave.sampleSize == 16) samples[i] = (float)(((short *)wave.data)[i])/32768.0f; else if (wave.sampleSize == 32) samples[i] = ((float *)wave.data)[i]; }