I noticed a wrong closing parenthesis (function(stream)*)*), so false alarm
On 01/01/2021 16:27, Hanns Holger Rutz wrote:
> 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?
>
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/608437d2-efa7-0677-568d-a3b81cf89b25%40sciss.de.
OpenPGP_signature
Description: OpenPGP digital signature
