Hi,
I am trying to create a wind sound that continuously plays but has a random delay between each play. I am finding that it might play once or twice and then it never plays again although the console seems to think it is.
I am using something like this
this.timer -=dt;
if (this.timer<0) {
this.timer = Math.random()*5+7;
console.log('playingsound');
this.camera.sound.stop("wind1");
this.camera.sound.play("wind1");
}
in an update loop for a script, the sample is less than 7 seconds long so it should be fine but I find the audio system seems to stop after a certain amount of time. I tried converting the sound to a different format i.e. ogg > wav but it made no difference.
the project can be found at
https://playcanvas.com/project/419717/overview/roof
UPDATE seems to be working fine on android chrome, i am guessing its just another freaking bug in chrome experimental. i will be glad when i can just use normal chrome for development!