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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user