From 63200ea395503bf4a6a5951017c57b84771b88ce Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 13 Sep 2016 00:03:41 -0700 Subject: [PATCH] optimize a getValue --- src/audio/emscripten/SDL_emscriptenaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/emscripten/SDL_emscriptenaudio.c b/src/audio/emscripten/SDL_emscriptenaudio.c index b48943c3c..2c97ffac9 100644 --- a/src/audio/emscripten/SDL_emscriptenaudio.c +++ b/src/audio/emscripten/SDL_emscriptenaudio.c @@ -127,7 +127,7 @@ HandleAudioProcess(_THIS) } for (var j = 0; j < $1; ++j) { - channelData[j] = getValue($0 + (j*numChannels + c)*4, 'float'); + channelData[j] = HEAPF32[$0 + ((j*numChannels + c) << 2) >> 2]; } } }, buf, byte_len / bytes / this->spec.channels);