fix transition sounds playing when attract sounds are off

This commit is contained in:
Chris Danford
2005-10-13 22:07:40 +00:00
parent 634ab18a79
commit ced0a0c6e9
2 changed files with 9 additions and 4 deletions
+6 -3
View File
@@ -591,6 +591,9 @@ void RageSound::StartPlaying()
SOUNDMAN->StartMixing( this ); SOUNDMAN->StartMixing( this );
if( !m_Param.m_bIsCriticalSound && SOUNDMAN->GetPlayOnlyCriticalSounds() )
m_Param.m_Volume = 0;
// LOG->Trace("StartPlaying %p finished (%s)", this, this->GetLoadedFilePath().c_str()); // LOG->Trace("StartPlaying %p finished (%s)", this, this->GetLoadedFilePath().c_str());
} }
@@ -871,7 +874,9 @@ void RageSoundParams::SetPlaybackRate( float fSpeed )
{ {
speed_input_samples = 1; speed_input_samples = 1;
speed_output_samples = 1; speed_output_samples = 1;
} else { }
else
{
/* Approximate it to the nearest tenth. */ /* Approximate it to the nearest tenth. */
speed_input_samples = int( roundf(fSpeed * 10) ); speed_input_samples = int( roundf(fSpeed * 10) );
speed_output_samples = 10; speed_output_samples = 10;
@@ -913,8 +918,6 @@ RageTimer RageSound::GetStartTime() const
void RageSound::SetParams( const RageSoundParams &p ) void RageSound::SetParams( const RageSoundParams &p )
{ {
m_Param = p; m_Param = p;
if( !m_Param.m_bIsCriticalSound && SOUNDMAN->GetPlayOnlyCriticalSounds() )
m_Param.m_Volume = 0;
} }
RageSoundParams::StopMode_t RageSound::GetStopMode() const RageSoundParams::StopMode_t RageSound::GetStopMode() const
+3 -1
View File
@@ -807,7 +807,9 @@ void ScreenManager::ZeroNextUpdate()
void ScreenManager::PlayInvalidSound() void ScreenManager::PlayInvalidSound()
{ {
m_soundInvalid.Play(); RageSoundParams p;
p.m_bIsCriticalSound = true;
m_soundInvalid.Play( &p );
} }
/* Always play these sounds, even if we're in a silent attract loop. */ /* Always play these sounds, even if we're in a silent attract loop. */