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/8699883b-eb13-5895-b429-829fff117cdf%40sciss.de.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to