| 1 |
/** |
| 2 |
* @fileoverview Public API. |
| 3 |
* @externs |
| 4 |
*/ |
| 5 |
|
| 6 |
/** |
| 7 |
* @constructor |
| 8 |
* @struct |
| 9 |
* @nosideeffects |
| 10 |
* @suppress {duplicate} |
| 11 |
* @param {!(string|number|Uint8Array|ArrayBuffer|Array<*>|SharedArrayBuffer)} arg |
| 12 |
* @param {string=} encoding |
| 13 |
*/ |
| 14 |
var Buffer = function (arg, encoding) {}; |
| 15 |
|
| 16 |
/** |
| 17 |
* @param {ArrayBuffer|SharedArrayBuffer} arrayBuffer |
| 18 |
* @param {number=} byteOffset |
| 19 |
* @param {number=} length |
| 20 |
* @return {Buffer} |
| 21 |
* @nosideeffects |
| 22 |
*/ |
| 23 |
Buffer.from = function (arrayBuffer, byteOffset, length) {}; |
| 24 |
|
| 25 |
/** |
| 26 |
* @param {Array.<Buffer|ArrayBuffer|SharedArrayBuffer>} arrayBuffer |
| 27 |
* @param {number=} length |
| 28 |
* @return {Buffer} |
| 29 |
* @nosideeffects |
| 30 |
*/ |
| 31 |
Buffer.concat = function (arrayBuffer, length) {}; |
| 32 |
|
| 33 |
/** |
| 34 |
* @typedef {{value:string, mutable:boolean}} |
| 35 |
*/ |
| 36 |
var WasmGlobalMeta; |
| 37 |
|
| 38 |
/** |
| 39 |
* @constructor |
| 40 |
* @param {WasmGlobalMeta} wasmGlobalMeta |
| 41 |
* @param {number} initialValue |
| 42 |
*/ |
| 43 |
WebAssembly.Global = function (wasmGlobalMeta, initialValue) {}; |
| 44 |
|
| 45 |
/** |
| 46 |
* @type {number} |
| 47 |
*/ |
| 48 |
WebAssembly.Global.prototype.value; |
| 49 |
|
| 50 |
/** |
| 51 |
* @function |
| 52 |
* @param {string} awScopeName |
| 53 |
* @param {Object} awClassName |
| 54 |
*/ |
| 55 |
var registerProcessor = function (awScopeName, awClassName) {}; |
| 56 |
|
| 57 |
/** @typedef {{ |
| 58 |
* csoundCreate: function(): number, |
| 59 |
* csoundDestroy: function(number): number, |
| 60 |
* csoundGetAPIVersion: function(number): number, |
| 61 |
* csoundGetVersion: function(number): number, |
| 62 |
* csoundInitialize: function(): number, |
| 63 |
* }} |
| 64 |
*/ |
| 65 |
var LibcsoundUncloned; |
| 66 |
|
| 67 |
// not sure if this hack is a good idea |
| 68 |
var process = { cwd: () => "/" }; |
| 69 |
|
| 70 |
/** |
| 71 |
* @suppress {duplicate} |
| 72 |
* @param {!(function(!MIDIInput))} |
| 73 |
* @return {IteratorIterable<string>} |
| 74 |
*/ |
| 75 |
MIDIInputMap.prototype.values = function () {}; |
| 76 |
|
| 77 |
/** @typedef {number} */ |
| 78 |
var CsoundInst; |
| 79 |
|
| 80 |
/** @typedef {{ |
| 81 |
* freeStringMem: function(number): void, |
| 82 |
* csoundGetSpout: function(CsoundInst): number, |
| 83 |
* csoundGetSpin: function(CsoundInst): number, |
| 84 |
* csoundGetInputBuffer: function(CsoundInst): number, |
| 85 |
* csoundGetOutputBuffer: function(CsoundInst): number, |
| 86 |
* }} */ |
| 87 |
var WasmExports; |
| 88 |
|
| 89 |
/** @typedef {{ |
| 90 |
* exports: WasmExports |
| 91 |
* }} */ |
| 92 |
var WasmInst; |
| 93 |
|
| 94 |
/** @typedef {{ |
| 95 |
* start: function(): Promise.<number>, |
| 96 |
* stop: function(): Promise.<number>, |
| 97 |
* }} |
| 98 |
*/ |
| 99 |
var CsoundObj; |