--
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 emscripten-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
// on iOS, WebAudio can only be initialized from a touch event,
// so we initialize soloud from within here, and tell the soundMgr
// that it is ok now to play audio
//
// https://paulbakaus.com/tutorials/html5/web-audio-on-ios/
EM_ASM(
SDL.openAudioContext();
var buffer = SDL.audioContext.createBuffer(1, 1, 22050);
var source = SDL.audioContext.createBufferSource();
source.buffer = buffer;
source.connect(SDL.audioContext.destination);
source.start(0);
);
SoundMgr* self = (SoundMgr*) userData;
if (!self->audioValid) {
self->soloud.init();
self->audioValid = true;
}
return false;