@@ -312,7 +312,6 @@ Phaser.Sound.prototype = {
312312 {
313313 this . _sound = this . game . cache . getSoundData ( this . key ) ;
314314 this . totalDuration = this . _sound . duration ;
315- // console.log('sound has unlocked' + this._sound);
316315 }
317316
318317 } ,
@@ -382,31 +381,26 @@ Phaser.Sound.prototype = {
382381
383382 if ( this . currentTime >= this . durationMS )
384383 {
385- // console.log(this.currentMarker, 'has hit duration');
386384 if ( this . usingWebAudio )
387385 {
388386 if ( this . loop )
389387 {
390- // console.log('loop1');
391388 // won't work with markers, needs to reset the position
392389 this . onLoop . dispatch ( this ) ;
393390
394391 if ( this . currentMarker === '' )
395392 {
396- // console.log('loop2');
397393 this . currentTime = 0 ;
398394 this . startTime = this . game . time . now ;
399395 }
400396 else
401397 {
402- // console.log('loop3');
403398 this . onMarkerComplete . dispatch ( this . currentMarker , this ) ;
404399 this . play ( this . currentMarker , 0 , this . volume , true , true ) ;
405400 }
406401 }
407402 else
408403 {
409- // console.log('stopping, no loop for marker');
410404 this . stop ( ) ;
411405 }
412406 }
@@ -588,16 +582,13 @@ Phaser.Sound.prototype = {
588582 }
589583 else
590584 {
591- // console.log('Sound play Audio');
592585 if ( this . game . cache . getSound ( this . key ) && this . game . cache . getSound ( this . key ) . locked )
593586 {
594- // console.log('tried playing locked sound, pending set, reload started');
595587 this . game . cache . reloadSound ( this . key ) ;
596588 this . pendingPlayback = true ;
597589 }
598590 else
599591 {
600- // console.log('sound not locked, state?', this._sound.readyState);
601592 if ( this . _sound && ( this . game . device . cocoonJS || this . _sound . readyState === 4 ) )
602593 {
603594 this . _sound . play ( ) ;
@@ -610,7 +601,6 @@ Phaser.Sound.prototype = {
610601 this . durationMS = this . totalDuration * 1000 ;
611602 }
612603
613- // console.log('playing', this._sound);
614604 this . _sound . currentTime = this . position ;
615605 this . _sound . muted = this . _muted ;
616606
0 commit comments