Skip to content

Commit

Permalink
Merge pull request #177 from chris-rudmin/onstart-fix
Browse files Browse the repository at this point in the history
Send header pages after onstart called.
  • Loading branch information
chris-rudmin authored Dec 11, 2018
2 parents bc080f8 + 0bfacf0 commit 525a3e7
Show file tree
Hide file tree
Showing 23 changed files with 58,828 additions and 60,294 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ A javascript library to encode the output of Web Audio API nodes in Ogg Opus or

#### Libraries Used

- Libopus: v1.3 compiled with emscripten 1.38.15
- speexDSP: 1.2RC3 compiled with emscripten 1.38.15
- Libopus: v1.3 compiled with emscripten 1.38.21
- speexDSP: 1.2RC3 compiled with emscripten 1.38.21

#### Required Files

Expand Down
87 changes: 17 additions & 70 deletions dist-unminified/decoderWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ return /******/ (function(modules) { // webpackBootstrap
/*! no static exports found */
/***/ (function(module, exports) {

eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvd2VicGFjay9idWlsZGluL2dsb2JhbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0RlY29kZXJXb3JrZXIvKHdlYnBhY2spL2J1aWxkaW4vZ2xvYmFsLmpzP2NkMDAiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGc7XG5cbi8vIFRoaXMgd29ya3MgaW4gbm9uLXN0cmljdCBtb2RlXG5nID0gKGZ1bmN0aW9uKCkge1xuXHRyZXR1cm4gdGhpcztcbn0pKCk7XG5cbnRyeSB7XG5cdC8vIFRoaXMgd29ya3MgaWYgZXZhbCBpcyBhbGxvd2VkIChzZWUgQ1NQKVxuXHRnID0gZyB8fCBGdW5jdGlvbihcInJldHVybiB0aGlzXCIpKCkgfHwgKDEsIGV2YWwpKFwidGhpc1wiKTtcbn0gY2F0Y2ggKGUpIHtcblx0Ly8gVGhpcyB3b3JrcyBpZiB0aGUgd2luZG93IHJlZmVyZW5jZSBpcyBhdmFpbGFibGVcblx0aWYgKHR5cGVvZiB3aW5kb3cgPT09IFwib2JqZWN0XCIpIGcgPSB3aW5kb3c7XG59XG5cbi8vIGcgY2FuIHN0aWxsIGJlIHVuZGVmaW5lZCwgYnV0IG5vdGhpbmcgdG8gZG8gYWJvdXQgaXQuLi5cbi8vIFdlIHJldHVybiB1bmRlZmluZWQsIGluc3RlYWQgb2Ygbm90aGluZyBoZXJlLCBzbyBpdCdzXG4vLyBlYXNpZXIgdG8gaGFuZGxlIHRoaXMgY2FzZS4gaWYoIWdsb2JhbCkgeyAuLi59XG5cbm1vZHVsZS5leHBvcnRzID0gZztcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/webpack/buildin/global.js\n");
eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nm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NBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/webpack/buildin/global.js\n");

/***/ }),

Expand Down Expand Up @@ -492,6 +492,15 @@ function dynCall(sig, ptr, args) {
}
}

var tempRet0 = 0;

var setTempRet0 = function(value) {
tempRet0 = value;
}

var getTempRet0 = function() {
return tempRet0;
}


var Runtime = {
Expand Down Expand Up @@ -1705,7 +1714,7 @@ function integrateWasmJS() {

// Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate
// the wasm module at that time, and it receives imports and provides exports and so forth, the app
// doesn't need to care that it is wasm or olyfilled wasm or asm.js.
// doesn't need to care that it is wasm or polyfilled wasm or asm.js.

Module['asm'] = function(global, env, providedBuffer) {
// import table
Expand All @@ -1725,11 +1734,11 @@ function integrateWasmJS() {
Module['wasmTable'] = env['table'];
}

if (!env['memoryBase']) {
env['memoryBase'] = Module['STATIC_BASE']; // tell the memory segments where to place themselves
if (!env['__memory_base']) {
env['__memory_base'] = Module['STATIC_BASE']; // tell the memory segments where to place themselves
}
if (!env['tableBase']) {
env['tableBase'] = 0; // table starts at 0 by default, in dynamic linking this will change
if (!env['__table_base']) {
env['__table_base'] = 0; // table starts at 0 by default, in dynamic linking this will change
}

// try the methods. each should return the exports if it succeeded
Expand Down Expand Up @@ -1775,35 +1784,21 @@ Module["STATIC_BUMP"] = STATIC_BUMP;
var tempDoublePtr = STATICTOP; STATICTOP += 16;

function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much

HEAP8[tempDoublePtr] = HEAP8[ptr];

HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];

HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];

HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];

}

function copyTempDouble(ptr) {

HEAP8[tempDoublePtr] = HEAP8[ptr];

HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];

HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];

HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];

HEAP8[tempDoublePtr+4] = HEAP8[ptr+4];

HEAP8[tempDoublePtr+5] = HEAP8[ptr+5];

HEAP8[tempDoublePtr+6] = HEAP8[ptr+6];

HEAP8[tempDoublePtr+7] = HEAP8[ptr+7];

}

// {{PRE_LIBRARY}}
Expand Down Expand Up @@ -1898,20 +1893,8 @@ function copyTempDouble(ptr) {

var _llvm_cos_f64=Math_cos;

var _llvm_ctlz_i32=true;

var _llvm_exp_f64=Math_exp;

var _llvm_fabs_f32=Math_abs;

var _llvm_floor_f32=Math_floor;

var _llvm_sin_f64=Math_sin;

var _llvm_sqrt_f32=Math_sqrt;

var _llvm_sqrt_f64=Math_sqrt;

function _llvm_stackrestore(p) {
var self = _llvm_stacksave;
var ret = self.LLVM_SAVEDSTACKS[p];
Expand Down Expand Up @@ -1992,42 +1975,9 @@ Module['wasmTableSize'] = 14;

Module['wasmMaxTableSize'] = 14;

function invoke_ii(index,a1) {
var sp = stackSave();
try {
return Module["dynCall_ii"](index,a1);
} catch(e) {
stackRestore(sp);
if (typeof e !== 'number' && e !== 'longjmp') throw e;
Module["setThrew"](1, 0);
}
}

function invoke_iiii(index,a1,a2,a3) {
var sp = stackSave();
try {
return Module["dynCall_iiii"](index,a1,a2,a3);
} catch(e) {
stackRestore(sp);
if (typeof e !== 'number' && e !== 'longjmp') throw e;
Module["setThrew"](1, 0);
}
}

function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6) {
var sp = stackSave();
try {
return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6);
} catch(e) {
stackRestore(sp);
if (typeof e !== 'number' && e !== 'longjmp') throw e;
Module["setThrew"](1, 0);
}
}

Module.asmGlobalArg = {};

Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "invoke_ii": invoke_ii, "invoke_iiii": invoke_iiii, "invoke_iiiiiii": invoke_iiiiiii, "___setErrNo": ___setErrNo, "___syscall140": ___syscall140, "___syscall146": ___syscall146, "___syscall6": ___syscall6, "_abort": _abort, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_llvm_cos_f64": _llvm_cos_f64, "_llvm_exp_f64": _llvm_exp_f64, "_llvm_fabs_f32": _llvm_fabs_f32, "_llvm_floor_f32": _llvm_floor_f32, "_llvm_sin_f64": _llvm_sin_f64, "_llvm_sqrt_f32": _llvm_sqrt_f32, "_llvm_sqrt_f64": _llvm_sqrt_f64, "_llvm_stackrestore": _llvm_stackrestore, "_llvm_stacksave": _llvm_stacksave, "flush_NO_FILESYSTEM": flush_NO_FILESYSTEM, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX };
Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "setTempRet0": setTempRet0, "getTempRet0": getTempRet0, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "___setErrNo": ___setErrNo, "___syscall140": ___syscall140, "___syscall146": ___syscall146, "___syscall6": ___syscall6, "_abort": _abort, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_llvm_cos_f64": _llvm_cos_f64, "_llvm_sin_f64": _llvm_sin_f64, "_llvm_stackrestore": _llvm_stackrestore, "_llvm_stacksave": _llvm_stacksave, "flush_NO_FILESYSTEM": flush_NO_FILESYSTEM, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX };
// EMSCRIPTEN_START_ASM
var asm =Module["asm"]// EMSCRIPTEN_END_ASM
(Module.asmGlobalArg, Module.asmLibraryArg, buffer);
Expand All @@ -2047,9 +1997,6 @@ var _speex_resampler_destroy = Module["_speex_resampler_destroy"] = function() {
var _speex_resampler_init = Module["_speex_resampler_init"] = function() { return Module["asm"]["_speex_resampler_init"].apply(null, arguments) };
var _speex_resampler_process_interleaved_float = Module["_speex_resampler_process_interleaved_float"] = function() { return Module["asm"]["_speex_resampler_process_interleaved_float"].apply(null, arguments) };
var establishStackSpace = Module["establishStackSpace"] = function() { return Module["asm"]["establishStackSpace"].apply(null, arguments) };
var getTempRet0 = Module["getTempRet0"] = function() { return Module["asm"]["getTempRet0"].apply(null, arguments) };
var runPostSets = Module["runPostSets"] = function() { return Module["asm"]["runPostSets"].apply(null, arguments) };
var setTempRet0 = Module["setTempRet0"] = function() { return Module["asm"]["setTempRet0"].apply(null, arguments) };
var setThrew = Module["setThrew"] = function() { return Module["asm"]["setThrew"].apply(null, arguments) };
var stackAlloc = Module["stackAlloc"] = function() { return Module["asm"]["stackAlloc"].apply(null, arguments) };
var stackRestore = Module["stackRestore"] = function() { return Module["asm"]["stackRestore"].apply(null, arguments) };
Expand Down Expand Up @@ -2266,7 +2213,7 @@ if (Module['preInit']) {
}


Module["noExitRuntime"] = true;
Module["noExitRuntime"] = true;

run();

Expand Down
Binary file modified dist-unminified/decoderWorker.wasm
Binary file not shown.
Loading

0 comments on commit 525a3e7

Please sign in to comment.