Replace repeated division with multiply by inverse

This commit is contained in:
Ken Cooke 2015-09-15 10:18:53 -07:00
parent 5045f8558e
commit ffe3fcf4ce

View file

@ -130,7 +130,7 @@ public:
// 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);
}
}