Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing up a bug when you would do pause, stop, play in that order.

  • Loading branch information...
commit bf5d339329ba85d19c445c2875029bed84732cc0 1 parent 32a1383
@dducharme dducharme authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 CocosDenshion/qnx/SimpleAudioEngine.cpp
View
12 CocosDenshion/qnx/SimpleAudioEngine.cpp
@@ -231,12 +231,12 @@ namespace CocosDenshion
}
else
{
- rewindBackgroundMusic();
+
+fprintf(stderr, "the play status is %d\n", s_playStatus);
if (s_playStatus == PAUSED)
- {
resumeBackgroundMusic();
- return;
- }
+ else
+ rewindBackgroundMusic();
}
if (!s_isBackgroundInitialized)
@@ -270,6 +270,10 @@ namespace CocosDenshion
void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData)
{
+ // if we were paused then we need to resume first so that we can play
+ if (s_playStatus == PAUSED)
+ resumeBackgroundMusic();
+
stopBackground(bReleaseData);
}
Please sign in to comment.
Something went wrong with that request. Please try again.