emscripten + SDL audio?
category: code [glöplog]
Hey, I have this web project using emscripten and SDL. It plays some white noise. Thing is I can only hear it through firefox. no safari no chrome. I'm pretty sure it's not the browsers muting the site. Has anyone else dealt with this???
Here's the site: http://theadesilva.com/gui
Here's the site: http://theadesilva.com/gui
here's main.c http://theadesilva.com/gui/main.c
nothing here under the latest ff either.
I do get the white noise on Chrome (81 on OS X) about 50% of the time. On the times it doesn't work, I get "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu" in the browser console, so from here it does look like the browser blocking audio. I'd try moving the soundp_start call into the mousedown handler, to see if that triggers it more reliably.
It takes a few seconds to load for me, so I suspect the intermittent successes are because I'm doing something that counts as a user interaction (e.g. opening the developer toolbar) before it reaches main().
It takes a few seconds to load for me, so I suspect the intermittent successes are because I'm doing something that counts as a user interaction (e.g. opening the developer toolbar) before it reaches main().