Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

malloc is undefined #6

Open
louisfoster opened this issue May 4, 2020 · 2 comments
Open

malloc is undefined #6

louisfoster opened this issue May 4, 2020 · 2 comments

Comments

@louisfoster
Copy link

louisfoster commented May 4, 2020

I appear to receive this error when wasm is used (it doesn't happen when using asm):

TypeError: Module.asm._malloc is undefined OpusEncoder.js line 422 > eval:1:118376
    _malloc http://localhost:7711/worker/OpusEncoder.js line 422 > eval:1
    getBufferFor http://localhost:7711/worker/EmsArgs.js:74
    readBlobAsArrayBuffer http://localhost:7711/worker/EmsArgs.js:52

I noticed that if I remove your input disabled attribute in your example and run the encoder twice, the same thing occurs. Is this intentional?

Searching around, the only thing similar is this: emscripten-core/emscripten#6632 (comment)

So I might give that a try myself when I have time.

@Rillke
Copy link
Owner

Rillke commented May 6, 2020

I appear to receive this error when wasm is used (it doesn't happen when using asm):

Just to be clear, are you using a custom build or the pre-built one from https://blog.rillke.com/opusenc.js/

Anyway, if you find a fix, Pull request is welcome. Thanks

@louisfoster
Copy link
Author

Prebuilt, I think the solution in the link will fix, however I am now using a similar lib that seems to compile as described:
https://github.com/chris-rudmin/opus-recorder/blob/master/Makefile#L5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants