There are several versions of this utility... too many. The problem is here:
/**
* There is an issue on Android in that csound may be undefined when the page is
* first rendered, and be defined only when the user plays the piece.
*/
var load_csound = async function(csound_message_callback_) {
let operating_system = get_operating_system();
if (operating_system === "Android" && typeof csound === 'undefined') {
csound_message_callback("Operating system is Android, but Csound is not yet defined.\n");
// On Android, Csound uses only stdout for messages; this becomes
// console.log, so we assign our "csound message callback" to
// console.log.
return;
}
I've made a variant, csoundloader.js, that omits this case, and should just proceed to load the WebAssembly build of Csound.
There are several versions of this utility... too many. The problem is here:
I've made a variant,
csoundloader.js
, that omits this case, and should just proceed to load the WebAssembly build of Csound.