When in attract and not playing attract sounds, have SOUNDMAN only play sounds with RageSoundParams.m_bCriticalSound == true.

Currently, only the coin sound has RageSoundParams.m_bCriticalSound = true.
This commit is contained in:
Chris Danford
2005-10-04 06:51:06 +00:00
parent 7cb3a12722
commit 15880eafd6
13 changed files with 30 additions and 15 deletions
+9 -1
View File
@@ -32,6 +32,7 @@ RageSoundManager::RageSoundManager()
{
pos_map_queue.reserve( 1024 );
m_fMixVolume = 1.0f;
m_bPlayOnlyCriticalSounds = false;
}
void RageSoundManager::Init( CString sDrivers )
@@ -328,13 +329,20 @@ void RageSoundManager::PlayOnce( CString sPath )
DeleteSoundWhenFinished( pSound );
}
void RageSoundManager::SetPrefs( float fMixVol )
void RageSoundManager::SetMixVolume( float fMixVol )
{
g_SoundManMutex.Lock(); /* lock for access to m_fMixVolume */
m_fMixVolume = fMixVol;
g_SoundManMutex.Unlock(); /* finished with m_fMixVolume */
}
void RageSoundManager::SetPlayOnlyCriticalSounds( bool bPlayOnlyCriticalSounds )
{
g_SoundManMutex.Lock(); /* lock for access to m_bPlayOnlyCriticalSounds */
m_bPlayOnlyCriticalSounds = bPlayOnlyCriticalSounds;
g_SoundManMutex.Unlock(); /* finished with m_bPlayOnlyCriticalSounds */
}
/* Standalone helpers: */
void RageSoundManager::AttenuateBuf( int16_t *pBuf, int iSamples, float fVolume )
{