From 082088f1521b01d45c7fcc855eee00778c35a7a7 Mon Sep 17 00:00:00 2001 From: BenTalagan Date: Fri, 15 Feb 2019 15:45:39 +0100 Subject: [PATCH] Fix for newer versions of emscripten --- emscripten/Makefile | 2 +- emscripten/js/demo.js | 3 +-- emscripten/post.js | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/emscripten/Makefile b/emscripten/Makefile index 3db5f6a9..e6909567 100644 --- a/emscripten/Makefile +++ b/emscripten/Makefile @@ -100,7 +100,7 @@ CXXFLAGS+=-I ./ -I ../ -I ../src/include/espeak-ng #CXXFLAGS+=-s USE_PTHREADS=1 # NOTE: extra flags for emscripten -EM_CXXFLAGS=-s RESERVED_FUNCTION_POINTERS=2 --memory-init-file 0 +EM_CXXFLAGS=-s RESERVED_FUNCTION_POINTERS=2 --memory-init-file 0 -s FORCE_FILESYSTEM=1 -s WASM=0 diff --git a/emscripten/js/demo.js b/emscripten/js/demo.js index 5a23c375..5ca65c25 100644 --- a/emscripten/js/demo.js +++ b/emscripten/js/demo.js @@ -186,7 +186,7 @@ function speak() { tts.synthesize( user_text, function cb(samples, events) { - //console.log(' Inside synt cb'); + console.log(' Receiving synthesis samples...'); if (!samples) { if (pusher) { pusher.close(); @@ -207,7 +207,6 @@ function speak() { ); // end of tts.synthesize() console.log(' Calling synthesize... done'); console.log('Leaving speak()'); - } // end of speak() function ipa() { diff --git a/emscripten/post.js b/emscripten/post.js index f5e13bc6..045f38c5 100644 --- a/emscripten/post.js +++ b/emscripten/post.js @@ -88,9 +88,9 @@ eSpeakNGWorker.prototype.synthesize = function (aText, aCallback) { return aCallback(data, events) ? 1 : 0; } - var fp = Runtime.addFunction(cb); + var fp = addFunction(cb); this.synth_(aText, fp); - Runtime.removeFunction(fp); + removeFunction(fp); }; eSpeakNGWorker.prototype.synthesize_ipa = function (aText, aCallback) {