fixed bug: The background music not stoped when app enter background some time.

This commit is contained in:
yangws 2011-05-18 14:34:22 +08:00
parent 8e07ab7dc9
commit e6c7d9fe63
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}