Commit Graph

9 Commits

Author SHA1 Message Date
SaxonDruce bbedddbf08 Fix bugs with music not resuming when iOS app is reactivated (#16178)
* Pause instead of stopping music on resign

The [audioSource stop] causes the music to be stopped, and therefore it fails to resume later on a call to [audioSource resume], due to the addition of the if (!stopped) check in resume added in 26a04b38f2

* Don't re-pause music that has already been paused

In this situation:

1. Start game, music plays
2. Switch to Music app, game music paused, start other music
3. Switch to game, game music not resumed due to other music playing
4. Switch to Music app, stop other music
5. Switch back to game, game music should resume due to no other music playing

At step 5 the game music doesn't currently resume. This is because at step 4 when switching to the Music app, the game music gets re-paused (actually isPlaying is false, so systemPaused is set to NO, even though the music *is* still paused). This causes the music to not be resumed at step 5.

This change fixes this, by skipping the pause logic if systemPaused is already true.

Note that this is dependent on https://github.com/cocos2d/cocos2d-x/pull/16178

* Fix typo in previous fix.
2016-07-21 17:41:24 +08:00
Xpol Wan 32e408487f Fixes import path for m and mm files. 2016-03-21 20:12:58 +08:00
Ricardo Quesada 77aa3871b6 fixes compilation issues on tvOS 2015-12-29 12:30:00 -08:00
Ricardo Quesada 692c0f8a0e adds tvOS support
Ported tests:
 - js-tests
 - cpp-tsts
 - lua-tests
 - game-controller tests

all of them working, but most of the tests can't be navigated
since they expect a controller.
2015-12-28 15:59:36 -08:00
mogemimi f280a31323 Fix typo in documentation and comments 2015-12-09 01:48:24 +09:00
andyque 5a9af407dc closed #4590, remove -> property access 2014-03-28 16:41:33 +08:00
andyque 97883acfb1 closed #4590, fixed rewind problems 2014-03-28 15:59:04 +08:00
andyque 26a04b38f2 closed #4562, fix audio resume bug after stop the music 2014-03-27 10:43:57 +08:00
minggo 4313c46e93 issue #2905:adjust folder structure 2013-10-12 11:22:05 +08:00