highfidelity/hifi — pull request #3172 by wangyix (2014-07-15 19:31:50+00:00)
Title: removed SIMD instructions in AudioMixer for Windows build; removed IsNaN check for _nextOutputTrailingLoudness

Issue: various float variables used in the AudioMixer were randomly becoming NaN. The cause of this seems to be the use of __m64 variables and SIMD instructions. When running dancer.js on a script agent (with local domain server and audiomixer), the script's audio is either heavily distorted or non-existent.

Fix: added some #ifdefs for Windows, which replaces the SIMD instructions with four regular add instructions. Also, since this seemed to fix the NaN issue, the NaN check that was added for _nextOutputTrailingLoudness in a previous PR will be removed.

Test: dancer.js audio is now working. Additionally, sound effects from button presses on script overlays now works every time on my machine as opposed to maybe 25% of the time.