Enable looped sounds only when unpausing sounds and not as soon as the checkbox is pressed

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6261 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2010-10-11 22:35:58 +00:00
parent 38d69360b1
commit bad35f1595
2 changed files with 16 additions and 1 deletions

View File

@@ -245,4 +245,19 @@ SFXManager::SFXStatus SFXOpenAL::getStatus()
}
} // getStatus
//-----------------------------------------------------------------------------
void SFXOpenAL::onSoundEnabledBack()
{
if (m_loop)
{
if (!m_ok) init();
if (m_ok)
{
play();
pause();
}
}
}
#endif //if HAVE_OGGVORBIS

View File

@@ -70,7 +70,7 @@ public:
virtual void position(const Vec3 &position);
virtual void volume(float gain);
virtual SFXManager::SFXStatus getStatus();
virtual void onSoundEnabledBack() { if (m_loop) resume(); }
virtual void onSoundEnabledBack();
}; // SFXOpenAL