optimize a getValue
authorAlon Zakai <alonzakai@gmail.com>
Tue, 13 Sep 2016 00:03:41 -0700
changeset 103226167a989223c
parent 10321 6564d3e3c5f6
child 10323 abfc071013af
optimize a getValue
src/audio/emscripten/SDL_emscriptenaudio.c
     1.1 --- a/src/audio/emscripten/SDL_emscriptenaudio.c	Tue Sep 13 00:03:40 2016 -0700
     1.2 +++ b/src/audio/emscripten/SDL_emscriptenaudio.c	Tue Sep 13 00:03:41 2016 -0700
     1.3 @@ -127,7 +127,7 @@
     1.4                  }
     1.5  
     1.6                  for (var j = 0; j < $1; ++j) {
     1.7 -                    channelData[j] = getValue($0 + (j*numChannels + c)*4, 'float');
     1.8 +                    channelData[j] = HEAPF32[$0 + ((j*numChannels + c) << 2) >> 2];
     1.9                  }
    1.10              }
    1.11          }, buf, byte_len / bytes / this->spec.channels);