1 decade 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');
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');