Merge pull request #5808 from kencooke/audio-fix

Audio fixes
This commit is contained in:
Brad Davis 2015-09-15 11:04:31 -07:00
commit 41383c49cf

View file

@ -125,12 +125,12 @@ public:
return;
}
const int scale = (2 << ((8 * sizeof(int16_t)) - 1));
const int scale = (1 << ((8 * sizeof(int16_t)) - 1));
// de-interleave and convert int16_t to float32 (normalized to -1. ... 1.)
for (uint32_t i = 0; i < frameCount; ++i) {
for (uint32_t j = 0; j < _channelCount; ++j) {
_buffer[j][i] = ((float)(*in++)) / scale;
_buffer[j][i] = ((float)(*in++)) * (1.0f / scale);
}
}