Web Audio Issues

Monkey Forums/Monkey Bug Reports/Web Audio Issues

Timotron(Posted 2014) [#1]
I have run into two issues after switching the project over to using Web Audio for our HTML5 target.

First:
Trying to load a sound and then playing it immediately does not play anything, I worked around this by preloading all sounds asynchronously before they are needed.

IE: doing this fails to play a sound



Second:
Our audio developer reported that the audio was now muffled and not playing clearly. On searching for this issue I found that changing the panner model to "equalpower" fixed the issue, and our audio dev verifies that it is fixed.

In the file "mojo.html5.js" I modified the following code


Note: There does seem some issues with how the panner in web audio works. https://github.com/WebAudio/web-audio-api/issues/372


marksibly(Posted 2014) [#2]
> Trying to load a sound and then playing it immediately does not play anything,

Not sure there's anything I can do about this - you just can't 'wait' for anything in html5. But I'll look into it.

> On searching for this issue I found that changing the panner model to "equalpower" fixed the issue, and our audio dev verifies that it is fixed.

Nice! Will add.


Carlo(Posted 2014) [#3]
audio code not work for ipad /iphone the sound is mute
i tested width wav ogg mp3 m4a all sound don't work ( html5 )
i compiled on iOS and work

Carlo


skid(Posted 2014) [#4]
This is not monkey's fault, audio startup must be instigated by user interaction event not app on iOS browser.


Carlo(Posted 2014) [#5]
i use a audiotext.monkey ( example bananas ) i compiling with html5 targhet upload a web server but not work into ipad iphone


skid(Posted 2014) [#6]
I'm not sure if any bananas are compliant with the following, typi-cripple Apple...


Note: On iOS, the Web Audio API requires sounds to be triggered from an explicit user action, such as a tap. Calling noteOn() from an onload event will not play sound.



https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/PlayingandSynthesizingSounds/PlayingandSynthesizingSounds.html