File tree 2 files changed +8
-2
lines changed
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# */{
2331
2331
if ( this . _paused ) return ;
2332
2332
this . _paused = true ;
2333
2333
// Pause audio engine
2334
- cc . audioEngine && cc . audioEngine . _pausePlaying ( ) ;
2334
+ if ( cc . audioEngine ) {
2335
+ cc . audioEngine . stopAllEffects ( ) ;
2336
+ cc . audioEngine . pauseMusic ( ) ;
2337
+ }
2335
2338
// Pause main loop
2336
2339
if ( this . _intervalId )
2337
2340
window . cancelAnimationFrame ( this . _intervalId ) ;
@@ -2345,7 +2348,9 @@ cc.game = /** @lends cc.game# */{
2345
2348
if ( ! this . _paused ) return ;
2346
2349
this . _paused = false ;
2347
2350
// Resume audio engine
2348
- cc . audioEngine && cc . audioEngine . _resumePlaying ( ) ;
2351
+ if ( cc . audioEngine ) {
2352
+ cc . audioEngine . resumeMusic ( ) ;
2353
+ }
2349
2354
// Resume main loop
2350
2355
this . _runMainLoop ( ) ;
2351
2356
} ,
Original file line number Diff line number Diff line change @@ -810,6 +810,7 @@ cc.Audio.WebAudio.prototype = {
810
810
for ( var i = 0 ; i < ap [ p ] . length ; i ++ ) {
811
811
list [ i ] . stop ( ) ;
812
812
}
813
+ list . length = 0 ;
813
814
}
814
815
} ,
815
816
You can’t perform that action at this time.
0 commit comments