Audio channels lock up - HTML5 + chromeHidden Forums/Bug Bin/Audio channels lock up - HTML5 + chrome
| A very strange behavior occurs unexpectedly with my audio channels. I'm not sure if this glitch is a chrome or html5 issue, or even an issue from myself.|
I have successfully reproduced the problem on Mark Sibly's audiotest.monkey by spaming key 4 "4) Play 'tinkle' through channel 3...5" until all channels refused to respond and stubbornly reported "1" as ChannelState even though they were completly mute.
When I launch the game, It runs just fine. Various sounds get played a few hundred of times for the next minute.
However, at some point, channels start "decaying" rapidly one by one and all of them shortly become unusable, muting completly my application. It also mutes off everything else ran by chrome. At this point Chrome will not close properly when requested and the remaining process requires to be killed in order to restart it with all channels unblocked.
Similar behavior with Channelstate also occurs, returning 1 for each channel locked up. If I play a sound on these channel their states just stays as 1 or randomly go back to 0...
This is my audio module I use for my game.
BP.aud array is global from the main class and contains the sounds and musics for my game.
Class audio Global channelcursor=0 Global channellength=31 Global channelmusicid=31 Global playedmusic Global count Function init() Local i For i=0 To 255 Local extension$=".wav" If i>127 extension=".ogg" Local name$="000000"+i name = "ID" + name[-6..] + extension BP.aud[i]=LoadSound(name) Next End Function Function play(id) Local ch = channelcursor PlaySound BP.aud[id],ch count+=1 channelcursor+=1 If channelcursor = channellength channelcursor = 0 Return ch End Function Function setmusic(id,loop=1) If playedmusic = id Return 'StopChannel id PlaySound BP.aud[id],channelmusicid,loop count+=1 playedmusic = id End Function End
I'll proceed regardless since I can test a fair bit of time before it happens. It's just an annoyance for now but I hope you can find the problem.
| Happens to me too, sometimes. I lose all audio until I restart Chrome.|
I only use HTML5 for quickly compiling/testing anyway, so not too bothered.
| Http://mdhv.blitzspace.com/online/ for the game (hosted it there while i'm working on it)|
After a while, you can see the channels going crazy without producing any sound at all.
Phew, glad to see i'm not alone with this problem =D
| Same problem here |