Thanks for the help.

Very helpful. I'm woefully needing help through my first foray and found
this GitHub repo to guide me through things and it echos your insight.
https://github.com/F1LT3R/voip-js/blob/master/lib/opus.js

Really appreciate the help.

Mahesh

On Sat, Sep 12, 2015 at 8:24 PM, Alon Zakai <[email protected]> wrote:

> General docs for such things are at
>
>
> http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html
>
> See the example with malloc for passing a pointer to allocated memory,
> etc., which you'll probably need if opus_encode receives pointers.
>
>
> On Sat, Sep 12, 2015 at 11:20 AM, Mahesh Kommareddi <
> [email protected]> wrote:
>
>> Hi all,
>>  I tried the IRC, but I'm hoping I can get some help here as well. I'm
>> basically brand new to emscripten. I'm trying to learn/get libopus to work
>> in the browser. I'm interested in both encode + decoding in the browser.
>>
>> I think I got everything compiled correctly. A gist of the emconfigure,
>> emmake:
>> https://gist.github.com/mkommar/9f51db6a2da114a5dab4
>>
>> 1) Do I compile the .a file or the .so file?
>> emcc libopus.so -o libopusa.html -s
>> EXPORTED_FUNCTIONS="['_opus_encoder_create', '_opus_encoder_ctl',
>> '_opus_encode', '_opus_encode_float', '_opus_encoder_destroy',
>> '_opus_decoder_create', '_opus_decode', '_opus_decode_float',
>> '_opus_decoder_destroy', '_encode_buffer', '_opus_strerror']" -s
>> RESERVED_FUNCTION_POINTERS=1
>>
>> If I compile the .so file, I can init the proper encoders and decoders
>> and run the opus_ecnoder_ctl for the encoder.
>>
>> https://gist.github.com/mkommar/e32977f6a2502c87bd47
>>
>> but I can't seem to understand how to actually use the opus_encode
>> (pointers, stackmax, etc) as working with the library by sending data to
>> the function seems to escape me .
>>
>> Can anyone help or is there anyone I can get referred to?
>>
>> --
>> 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].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/emscripten-discuss/UoApO89N_YE/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
PGP Key
https://pgp.mit.edu/pks/lookup?op=get&search=0x5AE46917FA2661DB

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to