Hi there,
When I remove the closure call, I actually get audio output! However, I
still see the huge UTF-8 string output and I get crackling audio fairly
frequently. The audio crackles more than usual if, for instance, I set
focus to the textarea. I have tried setting the samples in the spec
structure both to a high value like 4096, and to a lower one like 1024
with roughly the same results. Is there a way to get low latency audio
without crackling, and is it possible to get rid of the UTF-8 output?
Kind regards,
Philip Bennefall
P.S. The script does not seem to work in IE. Is this a known limitation?
On 12/29/2014 3:42 PM, Jukka Jylänki wrote:
Does it occur with all compilation flags? If you remove -O2 and/or
--closure 1, does it still occur? How about if you add -g to the build?
2014-12-28 16:25 GMT+02:00 <[email protected]
<mailto:[email protected]>>:
Hi all,
I am new to Emscripten, and am really impressed with it so far!
The setup procedure on Windows was smooth, and hello world built
just fine. I wanted to see if I could get audio working through
SDL2,, so I downloaded the SDL2 port by way of the automatic setup
command. Then, I ran the following from the Emscripten console:
emcc loopwave.cpp -o loopwave.html -DNDEBUG --preload-file
sample.wav -O2 -s USE_SDL=2 --closure 1
loopwave.cpp is basically loopwave.c from the SDL distribution,
pulled from the repo so that I get the emscriptin loop etc. I only
made one minor change; making it so that sample.wav is always used
and no command line input is considered. The file can be found at:
https://dl.dropboxusercontent.com/u/5121962/loopwave.cpp
sample.wav is here:
https://dl.dropboxusercontent.com/u/5121962/sample.wav
The program compiled without errors, letting me know that it was
using SDL2. I uploaded all the files to the server (the HTML, the
.js, the .mem and the .data files), and tried running it in both
Firefox and IE. In IE I saw nothing, but in Firefox I received
what looks like UTF-8 strings and then a ton of exceptions. They
are basically all the same, looking as follows:
"[post-exception status] Exception thrown, see JavaScript console"12
loopwave.html:1245
ReferenceError: Runtime is not defined
loopwave.js line 14 > eval:1
"[post-exception status] Exception thrown, see JavaScript console"
loopwave.html:1245
ReferenceError: Runtime is not defined
loopwave.js line 14 > eval:1
"[post-exception status] Exception thrown, see JavaScript console"2
loopwave.html:1245
ReferenceError: Runtime is not defined2
loopwave.js line 14 > eval:1
"[post-exception status] Exception thrown, see JavaScript console"
loopwave.html:1245
ReferenceError: Runtime is not defined
loopwave.js line 14 > eval:1
Etc. I have no idea what these errors mean, could anyone shed some
light?
Thanks in advance for any help!
Kind regards,
Philip Bennefall
--
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]
<mailto:[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/2IQ28VucwDQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
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.