Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

7 years ago by AlexB

I'm having a very weird issue. It seems that chrome will crash all the time if I load more than 8 sounds during my game initialization.

For example, if I uncomment the last line, the browser will crash, but it works as it is now. I have tried loading other sound files to make sure it's not a problem with the file itself and it still gives the same issue.

Note that it works fine in IE9.
Also it will work if I disable sound via ig.Sound.enabled = false;

Any idea?

this.sound_assaultRifle = new ig.Sound('media/sounds/assaultrifle.mp3');
this.sound_handgun = new ig.Sound('media/sounds/handgun.mp3');
this.sound_shotgun = new ig.Sound('media/sounds/shotgun.mp3');
this.sound_sniper = new ig.Sound('media/sounds/sniper.mp3');
this.sound_swing = new ig.Sound('media/sounds/swing.mp3');
this.sound_splash = new ig.Sound('media/sounds/splash1.mp3');
this.sound_pickup = new ig.Sound('media/sounds/lootpickup.mp3');
this.sound_zombie1 = new ig.Sound('media/sounds/zombie1.mp3');
//this.sound_zombie2 = new ig.Sound('media/sounds/zombie2.mp3');

7 years ago by AlexB

Hey guys I figured it out, it was my fault.
Because of this line :
ig.Sound.channels = 36;

I guess 36 copies of each files was a little bit too much :)
The thing is some of my items are "machine guns", so they fire very fast. So I had to put a high value because otherwise the sound clipped sometimes. I'll figure a workaround for that.

7 years ago by Jerczu

Yeah chrome is buggy this way...
Page 1 of 1
« first « previous next › last »