Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneko committed Dec 30, 2024
1 parent b97c186 commit 8b6bf81
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions samples/Samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,41 +537,41 @@ var tempI64;
// end include: runtime_debug.js
// === Body ===
var ASM_CONSTS = {
1947164: () => {
1947228: () => {
FS.syncfs(function(err) {
if (err) {
console.error(err);
}
});
},
1947228: $0 => {
1947292: $0 => {
var str = UTF8ToString($0) + "\n\n" + "Abort/Retry/Ignore/AlwaysIgnore? [ariA] :";
var reply = window.prompt(str, "i");
if (reply === null) {
reply = "i";
}
return allocate(intArrayFromString(reply), "i8", ALLOC_NORMAL);
},
1947453: ($0, $1) => {
1947517: ($0, $1) => {
alert(UTF8ToString($0) + "\n\n" + UTF8ToString($1));
},
1947510: () => {
1947574: () => {
if (typeof (AudioContext) !== "undefined") {
return true;
} else if (typeof (webkitAudioContext) !== "undefined") {
return true;
}
return false;
},
1947657: () => {
1947721: () => {
if ((typeof (navigator.mediaDevices) !== "undefined") && (typeof (navigator.mediaDevices.getUserMedia) !== "undefined")) {
return true;
} else if (typeof (navigator.webkitGetUserMedia) !== "undefined") {
return true;
}
return false;
},
1947891: $0 => {
1947955: $0 => {
if (typeof (Module["SDL2"]) === "undefined") {
Module["SDL2"] = {};
}
Expand All @@ -593,11 +593,11 @@ var ASM_CONSTS = {
}
return SDL2.audioContext === undefined ? -1 : 0;
},
1948384: () => {
1948448: () => {
var SDL2 = Module["SDL2"];
return SDL2.audioContext.sampleRate;
},
1948452: ($0, $1, $2, $3) => {
1948516: ($0, $1, $2, $3) => {
var SDL2 = Module["SDL2"];
var have_microphone = function(stream) {
if (SDL2.capture.silenceTimer !== undefined) {
Expand Down Expand Up @@ -638,7 +638,7 @@ var ASM_CONSTS = {
}, have_microphone, no_microphone);
}
},
1950104: ($0, $1, $2, $3) => {
1950168: ($0, $1, $2, $3) => {
var SDL2 = Module["SDL2"];
SDL2.audio.scriptProcessorNode = SDL2.audioContext["createScriptProcessor"]($1, 0, $0);
SDL2.audio.scriptProcessorNode["onaudioprocess"] = function(e) {
Expand All @@ -650,7 +650,7 @@ var ASM_CONSTS = {
};
SDL2.audio.scriptProcessorNode["connect"](SDL2.audioContext["destination"]);
},
1950514: ($0, $1) => {
1950578: ($0, $1) => {
var SDL2 = Module["SDL2"];
var numChannels = SDL2.capture.currentCaptureBuffer.numberOfChannels;
for (var c = 0; c < numChannels; ++c) {
Expand All @@ -669,7 +669,7 @@ var ASM_CONSTS = {
}
}
},
1951119: ($0, $1) => {
1951183: ($0, $1) => {
var SDL2 = Module["SDL2"];
var numChannels = SDL2.audio.currentOutputBuffer["numberOfChannels"];
for (var c = 0; c < numChannels; ++c) {
Expand All @@ -682,7 +682,7 @@ var ASM_CONSTS = {
}
}
},
1951599: $0 => {
1951663: $0 => {
var SDL2 = Module["SDL2"];
if ($0) {
if (SDL2.capture.silenceTimer !== undefined) {
Expand Down Expand Up @@ -720,7 +720,7 @@ var ASM_CONSTS = {
SDL2.audioContext = undefined;
}
},
1952771: ($0, $1, $2) => {
1952835: ($0, $1, $2) => {
var w = $0;
var h = $1;
var pixels = $2;
Expand Down Expand Up @@ -791,7 +791,7 @@ var ASM_CONSTS = {
}
SDL2.ctx.putImageData(SDL2.image, 0, 0);
},
1954240: ($0, $1, $2, $3, $4) => {
1954304: ($0, $1, $2, $3, $4) => {
var w = $0;
var h = $1;
var hot_x = $2;
Expand Down Expand Up @@ -828,19 +828,19 @@ var ASM_CONSTS = {
stringToUTF8(url, urlBuf, url.length + 1);
return urlBuf;
},
1955229: $0 => {
1955293: $0 => {
if (Module["canvas"]) {
Module["canvas"].style["cursor"] = UTF8ToString($0);
}
},
1955312: () => {
1955376: () => {
if (Module["canvas"]) {
Module["canvas"].style["cursor"] = "none";
}
},
1955381: () => window.innerWidth,
1955411: () => window.innerHeight,
1955442: $0 => {
1955445: () => window.innerWidth,
1955475: () => window.innerHeight,
1955506: $0 => {
try {
const context = GL.getContext($0);
if (!context) {
Expand Down
Binary file modified samples/Samples.wasm
Binary file not shown.

0 comments on commit 8b6bf81

Please sign in to comment.