EM_ASM contents parsed by C++ compiler

10 views
Skip to first unread message

Hanns Holger Rutz

unread,
Jan 1, 2021, 10:27:08 AM1/1/21
to emscripte...@googlegroups.com
hi there,

I'm having trouble inserting some JS code inside EM_ASM_INT; it seems
the C++ compiler wants to parse it somehow:

int res = EM_ASM_INT({
var md = window.navigator.mediaDevices;
var req = md.getUserMedia({ audio: true });
req.then(function(stream)) {
// TODO
}).catch(function(err) {
console.log("Error: could not obtain audio input device");
});
}, 1234);

~/Documents/devel/supercollider/server/scsynth/SC_WebAudio.cpp:369:16:
error: expected unqualified-id
}).catch(function(err) {
^

how do I fix this?

OpenPGP_signature

Hanns Holger Rutz

unread,
Jan 1, 2021, 10:31:51 AM1/1/21
to emscripte...@googlegroups.com
I noticed a wrong closing parenthesis (function(stream)*)*), so false alarm
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages