mirror of https://github.com/axmolengine/axmol.git
fixed bug: The background music not stoped when app enter background some time.
This commit is contained in:
parent
8e07ab7dc9
commit
e6c7d9fe63
|
@ -121,7 +121,7 @@ void SoundPlayer::Release()
|
|||
|
||||
void SoundPlayer::Pause()
|
||||
{
|
||||
if (m_pPlayer && m_pPlayer->GetCurrentStatus() == PLAYER_STATUS_PLAYING)
|
||||
if (m_pPlayer && PLAYER_STATUS_PAUSED != m_pPlayer->GetCurrentStatus())
|
||||
{
|
||||
m_pPlayer->Pause();
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ void SoundPlayer::Pause()
|
|||
|
||||
void SoundPlayer::Resume()
|
||||
{
|
||||
if (m_pPlayer && m_pPlayer->GetCurrentStatus() == PLAYER_STATUS_PAUSED)
|
||||
if (m_pPlayer && PLAYER_STATUS_PLAYING != m_pPlayer->GetCurrentStatus())
|
||||
{
|
||||
m_pPlayer->Resume();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue