axmol/cocos
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
..
2d Merge pull request #16172 from cezheng/fix/label_text_formatter_right_alignment 2016-07-21 15:21:12 +08:00
3d Use std::abs to avoid overhead of casting float to double 2016-07-13 00:55:11 +09:00
audio Fix bugs with music not resuming when iOS app is reactivated (#16178) 2016-07-21 17:41:24 +08:00
base Merge pull request #16164 from dumganhar/fix/iss16046-fps-clock 2016-07-21 16:01:58 +08:00
deprecated Move StringUtils functions from deprecated header file to ccUTF8.h (#15835) 2016-06-15 15:01:26 +08:00
editor-support Fixed to use cocosstudio LoadingBarReader with TexturePacker. 2016-07-17 16:30:17 +09:00
math Avoid overhead of casting float to double 2016-07-07 01:38:27 +09:00
navmesh Use std::abs to avoid overhead of casting float to double 2016-07-13 00:55:11 +09:00
network fix compiling and linking error with ndk r12b 2016-07-08 15:29:35 +08:00
physics Merge pull request #16151 from mogemimi/fix-function-spelling 2016-07-20 09:56:51 +08:00
physics3d Fix typos and other mistakes in docs 2016-07-04 00:42:10 +09:00
platform fix: display FPS again on GLFW platforms 2016-07-19 18:26:14 -07:00
renderer Fix typo in constant name 2016-07-21 00:49:19 +09:00
scripting [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16175) 2016-07-21 10:11:14 +08:00
storage fix compiling and linking error with ndk r12b 2016-07-08 15:29:35 +08:00
ui Fix typos in documentation comments 2016-07-16 04:18:40 +09:00
vr fix: collection of vr fixes (#15948) 2016-06-24 16:55:28 +08:00
Android.mk fix compiling and linking error with ndk r12b 2016-07-08 15:29:35 +08:00
CMakeLists.txt Merge pull request #15853 from ricardoquesada/vr_squashed 2016-06-17 10:15:20 +08:00
cc_dummy.c Squashed commit of the following: 2016-03-02 16:51:54 -08:00
cocos2d.cpp update version 2016-06-17 18:09:27 +08:00
cocos2d.h update version 2016-06-17 18:09:27 +08:00