Audio loop help

Community Forums/Monkey Talk/Audio loop help

Big_Dave(Posted 2011) [#1]
Hi,

I am trying out Monkey before purchasing and loving it so far. I've not had too many problems but cannot get audio looping working.

I'm trying to load a music file (ogg) and loop it. Here's my code (menu_music_playing is set to 0 on first loop):

If menu_music_playing =0
  StopChannel(1)
  PlaySound (musicmenu,1,1)
  menu_music_playing=1
Endif


musicmenu plays once but the docs suggest that having the 1,1 after PlaySound should assign it to Channel 1 (which it does) and then loop it (or 0 for play the sound once). Thing is, it only plays it once even though I've set it to 1.

Pretty sure I'm doing something stupid here! Can you help?

Thanks - Dave.


MikeHart(Posted 2011) [#2]
I guess you are using FireFox 3.1.x. There looping doesn't work. Try Chrome.

It's a browser problem, not Monkey. The HTML5 implementation of these browser differ a lot.

Last edited 2011


Canardian(Posted 2011) [#3]
In Chrome the shoot sound crackles at the end, and the looping stutters.
In Opera the sounds work perfectly, it seems to be the only browser which can play HTML5 sounds without problems.