File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2331,7 +2331,10 @@ cc.game = /** @lends cc.game# */{
23312331 if ( this . _paused ) return ;
23322332 this . _paused = true ;
23332333 // Pause audio engine
2334- cc . audioEngine && cc . audioEngine . _pausePlaying ( ) ;
2334+ if ( cc . audioEngine ) {
2335+ cc . audioEngine . stopAllEffects ( ) ;
2336+ cc . audioEngine . pauseMusic ( ) ;
2337+ }
23352338 // Pause main loop
23362339 if ( this . _intervalId )
23372340 window . cancelAnimationFrame ( this . _intervalId ) ;
@@ -2345,7 +2348,9 @@ cc.game = /** @lends cc.game# */{
23452348 if ( ! this . _paused ) return ;
23462349 this . _paused = false ;
23472350 // Resume audio engine
2348- cc . audioEngine && cc . audioEngine . _resumePlaying ( ) ;
2351+ if ( cc . audioEngine ) {
2352+ cc . audioEngine . resumeMusic ( ) ;
2353+ }
23492354 // Resume main loop
23502355 this . _runMainLoop ( ) ;
23512356 } ,
Original file line number Diff line number Diff line change @@ -810,6 +810,7 @@ cc.Audio.WebAudio.prototype = {
810810 for ( var i = 0 ; i < ap [ p ] . length ; i ++ ) {
811811 list [ i ] . stop ( ) ;
812812 }
813+ list . length = 0 ;
813814 }
814815 } ,
815816
You can’t perform that action at this time.
0 commit comments