diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 6d8c5aad46..52a14ab7f6 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -1446,6 +1446,9 @@ Reload Overlay Screens=Reload Overlay Screens Reload Theme and Textures=Reload Theme and Textures Rendering Stats=Rendering Stats Reset key mapping to default=Reset key mapping to default +Mute actions=Mute actions +Mute actions on=Mute actions on +Mute actions off=Mute actions off Screen Test Mode=Screen Test Mode Send Off To Screen=Send Off To Screen Send On To Screen=Send On To Screen diff --git a/src/ActorSound.cpp b/src/ActorSound.cpp index c83605e1a9..789f816882 100644 --- a/src/ActorSound.cpp +++ b/src/ActorSound.cpp @@ -14,7 +14,7 @@ void ActorSound::Load( const RString &sPath ) void ActorSound::Play() { - m_Sound.Play(); + m_Sound.Play(false); } void ActorSound::Pause( bool bPause ) diff --git a/src/EditMenu.cpp b/src/EditMenu.cpp index 69c4641b14..8c62dda204 100644 --- a/src/EditMenu.cpp +++ b/src/EditMenu.cpp @@ -316,7 +316,7 @@ void EditMenu::Up() } while (!RowIsSelectable(dest)); ASSERT( dest >= 0 ); ChangeToRow( dest ); - m_soundChangeRow.Play(); + m_soundChangeRow.Play(true); } void EditMenu::Down() @@ -328,7 +328,7 @@ void EditMenu::Down() } while (!RowIsSelectable(dest)); ASSERT( dest < NUM_EditMenuRow ); ChangeToRow( dest ); - m_soundChangeRow.Play(); + m_soundChangeRow.Play(true); } void EditMenu::Left() @@ -338,7 +338,7 @@ void EditMenu::Left() m_iSelection[m_SelectedRow]--; wrap( m_iSelection[m_SelectedRow], GetRowSize(m_SelectedRow) ); OnRowValueChanged( m_SelectedRow ); - m_soundChangeValue.Play(); + m_soundChangeValue.Play(true); } } @@ -349,7 +349,7 @@ void EditMenu::Right() m_iSelection[m_SelectedRow]++; wrap( m_iSelection[m_SelectedRow], GetRowSize(m_SelectedRow) ); OnRowValueChanged( m_SelectedRow ); - m_soundChangeValue.Play(); + m_soundChangeValue.Play(true); } } diff --git a/src/GameSoundManager.cpp b/src/GameSoundManager.cpp index 4a39336570..73d2153901 100644 --- a/src/GameSoundManager.cpp +++ b/src/GameSoundManager.cpp @@ -276,7 +276,7 @@ static void DoPlayOnce( RString sPath ) RageSound *pSound = new RageSound; pSound->Load( sPath, false ); - pSound->Play(); + pSound->Play(false); pSound->DeleteSelfWhenFinishedPlaying(); } diff --git a/src/GameplayAssist.cpp b/src/GameplayAssist.cpp index 9334470812..862bdf3744 100644 --- a/src/GameplayAssist.cpp +++ b/src/GameplayAssist.cpp @@ -59,7 +59,7 @@ void GameplayAssist::PlayTicks( const NoteData &nd, const PlayerState *ps ) RageSoundParams p; p.m_StartTime = position.m_LastBeatUpdate + (fSecondsUntil - (float)CommonMetrics::TICK_EARLY_SECONDS); - m_soundAssistClap.Play( &p ); + m_soundAssistClap.Play(false, &p); } } @@ -96,9 +96,9 @@ void GameplayAssist::PlayTicks( const NoteData &nd, const PlayerState *ps ) RageSoundParams p; p.m_StartTime = position.m_LastBeatUpdate + (fSecondsUntil - (float)CommonMetrics::TICK_EARLY_SECONDS); if( bIsMeasure ) - m_soundAssistMetronomeMeasure.Play( &p ); + m_soundAssistMetronomeMeasure.Play(false, &p); else - m_soundAssistMetronomeBeat.Play( &p ); + m_soundAssistMetronomeBeat.Play(false, &p); } } diff --git a/src/Inventory.cpp b/src/Inventory.cpp index aabb821bad..7b416d35f4 100644 --- a/src/Inventory.cpp +++ b/src/Inventory.cpp @@ -92,7 +92,7 @@ void Inventory::Load( PlayerState* pPlayerState ) void Inventory::Update( float fDelta ) { if( m_pPlayerState->m_bAttackEndedThisUpdate ) - m_soundItemEnding.Play(); + m_soundItemEnding.Play(false); // TODO: remove use of PlayerNumber PlayerNumber pn = m_pPlayerState->m_PlayerNumber; @@ -183,7 +183,7 @@ void Inventory::AwardItem( int iItemIndex ) a.fSecsRemaining = ITEM_DURATION_SECONDS; a.level = g_Items[iItemIndex].level; pInventory[iOpenSlot] = a; - m_soundAcquireItem.Play(); + m_soundAcquireItem.Play(false); } // else not enough room to insert item } @@ -200,7 +200,7 @@ void Inventory::UseItem( int iSlot ) // remove the item pInventory[iSlot].MakeBlank(); - m_vpSoundUseItem[a.level]->Play(); + m_vpSoundUseItem[a.level]->Play(false); PlayerNumber pnToAttack = OPPOSITE_PLAYER[pn]; PlayerState *pPlayerStateToAttack = GAMESTATE->m_pPlayerState[pnToAttack]; diff --git a/src/LifeMeterBattery.cpp b/src/LifeMeterBattery.cpp index 7a9b392c3e..8378ab5a93 100644 --- a/src/LifeMeterBattery.cpp +++ b/src/LifeMeterBattery.cpp @@ -107,7 +107,7 @@ void LifeMeterBattery::OnSongEnded() m_iLivesLeft = min( m_iLivesLeft, m_pPlayerState->m_PlayerOptions.GetSong().m_BatteryLives ); if( m_iTrailingLivesLeft < m_iLivesLeft ) - m_soundGainLife.Play(); + m_soundGainLife.Play(false); } Refresh(); @@ -120,7 +120,7 @@ void LifeMeterBattery::SubtractLives( int iLives ) m_iTrailingLivesLeft = m_iLivesLeft; m_iLivesLeft -= iLives; - m_soundLoseLife.Play(); + m_soundLoseLife.Play(false); m_textNumLives.PlayCommand("LoseLife"); Refresh(); @@ -135,7 +135,7 @@ void LifeMeterBattery::AddLives( int iLives ) m_iTrailingLivesLeft = m_iLivesLeft; m_iLivesLeft += iLives; - m_soundGainLife.Play(); + m_soundGainLife.Play(false); m_textNumLives.PlayCommand("GainLife"); Refresh(); diff --git a/src/LifeMeterTime.cpp b/src/LifeMeterTime.cpp index b201d92661..fc16386927 100644 --- a/src/LifeMeterTime.cpp +++ b/src/LifeMeterTime.cpp @@ -128,7 +128,7 @@ void LifeMeterTime::OnLoadSong() if( MIN_LIFE_TIME > fGainSeconds ) fGainSeconds = MIN_LIFE_TIME; m_fLifeTotalGainedSeconds += fGainSeconds; - m_soundGainLife.Play(); + m_soundGainLife.Play(false); SendLifeChangedMessage( fOldLife, TapNoteScore_Invalid, HoldNoteScore_Invalid ); } diff --git a/src/MemoryCardManager.cpp b/src/MemoryCardManager.cpp index 079fce2d0b..adf8ef14a9 100644 --- a/src/MemoryCardManager.cpp +++ b/src/MemoryCardManager.cpp @@ -481,18 +481,18 @@ void MemoryCardManager::CheckStateChanges() case MemoryCardState_Removed: if( LastState == MemoryCardState_Ready ) { - m_soundDisconnect.Play( ¶ms ); + m_soundDisconnect.Play(true, ¶ms); MESSAGEMAN->Broadcast( (MessageID)(Message_CardRemovedP1+p) ); } break; case MemoryCardState_Ready: - m_soundReady.Play( ¶ms ); + m_soundReady.Play(true, ¶ms); break; case MemoryCardState_TooLate: - m_soundTooLate.Play( ¶ms ); + m_soundTooLate.Play(true, ¶ms); break; case MemoryCardState_Error: - m_soundError.Play( ¶ms ); + m_soundError.Play(true, ¶ms); break; default: break; } diff --git a/src/MenuTimer.cpp b/src/MenuTimer.cpp index 7f8b4b24f0..c90e835612 100644 --- a/src/MenuTimer.cpp +++ b/src/MenuTimer.cpp @@ -110,7 +110,7 @@ void MenuTimer::Update( float fDeltaTime ) } if( iCrossed <= WARNING_BEEP_START && m_soundBeep.IsLoaded() && !m_bSilent ) - m_soundBeep.Play(); + m_soundBeep.Play(false); } if( fNewSecondsLeft == 0 ) diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index a9e00777f2..56790c4516 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -1172,7 +1172,7 @@ void MusicWheel::ChangeMusic( int iDist ) // If we're moving automatically, don't play this; it'll be called in Update. if(!IsMoving()) - m_soundChangeMusic.Play(); + m_soundChangeMusic.Play(true); } @@ -1201,7 +1201,7 @@ bool MusicWheel::ChangeSort( SortOrder new_so, bool allowSameSort ) // return tr SCREENMAN->PostMessageToTopScreen( SM_SortOrderChanging, 0 ); - m_soundChangeSort.Play(); + m_soundChangeSort.Play(true); TweenOffScreenForSort(); diff --git a/src/Player.cpp b/src/Player.cpp index e23d707d9b..08e5cff5b3 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -850,9 +850,9 @@ void Player::Update( float fDeltaTime ) if( g_bEnableAttackSoundPlayback ) { if( m_pPlayerState->m_bAttackBeganThisUpdate ) - m_soundAttackLaunch.Play(); + m_soundAttackLaunch.Play(false); if( m_pPlayerState->m_bAttackEndedThisUpdate ) - m_soundAttackEnding.Play(); + m_soundAttackEnding.Play(false); } float fMiniPercent = m_pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_MINI]; @@ -1997,7 +1997,7 @@ void Player::PlayKeysound( const TapNote &tn, TapNoteScore score ) } } } - m_vKeysounds[tn.iKeysoundIndex].Play(); + m_vKeysounds[tn.iKeysoundIndex].Play(false); Preference *pVolume = Preference::GetPreferenceByName("SoundVolume"); float fVol = pVolume->Get(); m_vKeysounds[tn.iKeysoundIndex].SetProperty ("Volume", fVol); @@ -2491,7 +2491,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b { score = TNS_None; // don't score this as anything - m_soundAttackLaunch.Play(); + m_soundAttackLaunch.Play(false); // put attack in effect Attack attack( @@ -2889,7 +2889,7 @@ void Player::UpdateJudgedRows() { // Only play one copy of each mine sound at a time per player. (*s)->Stop(); - (*s)->Play(); + (*s)->Play(false); } } } diff --git a/src/PrefsManager.cpp b/src/PrefsManager.cpp index a17b113221..53d25b379e 100644 --- a/src/PrefsManager.cpp +++ b/src/PrefsManager.cpp @@ -286,6 +286,7 @@ PrefsManager::PrefsManager() : m_bMonkeyInput ( "MonkeyInput", false ), m_sMachineName ( "MachineName", "" ), m_sCoursesToShowRanking ( "CoursesToShowRanking", "" ), + m_MuteActions("MuteActions", false), m_bQuirksMode ( "QuirksMode", false ), diff --git a/src/PrefsManager.h b/src/PrefsManager.h index 4caee949fc..334917c6a2 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -295,6 +295,7 @@ public: Preference m_bMonkeyInput; Preference m_sMachineName; Preference m_sCoursesToShowRanking; + Preference m_MuteActions; /** @brief Enable some quirky behavior used by some older versions of StepMania. */ Preference m_bQuirksMode; diff --git a/src/RageSound.cpp b/src/RageSound.cpp index 0a0ee3df09..3b4506aec9 100644 --- a/src/RageSound.cpp +++ b/src/RageSound.cpp @@ -392,13 +392,17 @@ void RageSound::SoundIsFinishedPlaying() m_Mutex.Unlock(); } -void RageSound::Play( const RageSoundParams *pParams ) +void RageSound::Play(bool is_action, const RageSoundParams *pParams) { if( m_pSource == NULL ) { LOG->Warn( "RageSound::Play: sound not loaded" ); return; } + if(is_action && PREFSMAN->m_MuteActions) + { + return; + } if( IsPlaying() ) { diff --git a/src/RageSound.h b/src/RageSound.h index ffde44a9a0..787fe4a239 100644 --- a/src/RageSound.h +++ b/src/RageSound.h @@ -120,7 +120,7 @@ public: RString GetError() const { return m_sError; } - void Play( const RageSoundParams *params=NULL ); + void Play(bool is_action, const RageSoundParams *params=NULL); void PlayCopy( const RageSoundParams *pParams = NULL ) const; void Stop(); diff --git a/src/RandomSample.cpp b/src/RandomSample.cpp index fb593f67d2..1f519422a1 100644 --- a/src/RandomSample.cpp +++ b/src/RandomSample.cpp @@ -106,7 +106,7 @@ void RandomSample::PlayRandom() int iIndexToPlay = GetNextToPlay(); if( iIndexToPlay == -1 ) return; - m_pSamples[iIndexToPlay]->Play(); + m_pSamples[iIndexToPlay]->Play(true); } void RandomSample::PlayCopyOfRandom() diff --git a/src/ScreenDebugOverlay.cpp b/src/ScreenDebugOverlay.cpp index 0dd61a09a3..95f520b910 100644 --- a/src/ScreenDebugOverlay.cpp +++ b/src/ScreenDebugOverlay.cpp @@ -52,6 +52,8 @@ static const ThemeMetric PAGE_SPACING_X ("ScreenDebugOverlay", "PageSpac // We don't use SubscriptionManager, because we want to keep the line order. static LocalizedString ON ( "ScreenDebugOverlay", "on" ); static LocalizedString OFF ( "ScreenDebugOverlay", "off" ); +static LocalizedString MUTE_ACTIONS_ON ("ScreenDebugOverlay", "Mute actions on"); +static LocalizedString MUTE_ACTIONS_OFF ("ScreenDebugOverlay", "Mute actions off"); class IDebugLine; static vector *g_pvpSubscribers = NULL; @@ -113,6 +115,7 @@ struct MapDebugToDI DeviceInput holdForDebug2; DeviceInput holdForSlow; DeviceInput holdForFast; + DeviceInput toggleMute; DeviceInput debugButton[MAX_DEBUG_LINES]; DeviceInput gameplayButton[MAX_DEBUG_LINES]; map pageButton; @@ -122,6 +125,7 @@ struct MapDebugToDI holdForDebug2.MakeInvalid(); holdForSlow.MakeInvalid(); holdForFast.MakeInvalid(); + toggleMute.MakeInvalid(); for( int i=0; im_MuteActions.Set(!PREFSMAN->m_MuteActions); + SCREENMAN->SystemMessage(PREFSMAN->m_MuteActions ? MUTE_ACTIONS_ON.GetValue() : MUTE_ACTIONS_OFF.GetValue()); + } int iPage = 0; if( g_bIsDisplayed && GetValueFromMap(g_Mappings.pageButton, input.DeviceI, iPage) ) @@ -546,6 +556,7 @@ static LocalizedString CLEAR_PROFILE_STATS ( "ScreenDebugOverlay", "Clear Profil static LocalizedString FILL_PROFILE_STATS ( "ScreenDebugOverlay", "Fill Profile Stats" ); static LocalizedString SEND_NOTES_ENDED ( "ScreenDebugOverlay", "Send Notes Ended" ); static LocalizedString RESET_KEY_MAP ("ScreenDebugOverlay", "Reset key mapping to default"); +static LocalizedString MUTE_ACTIONS ("ScreenDebugOverlay", "Mute actions"); static LocalizedString RELOAD ( "ScreenDebugOverlay", "Reload" ); static LocalizedString RESTART ( "ScreenDebugOverlay", "Restart" ); static LocalizedString SCREEN_ON ( "ScreenDebugOverlay", "Send On To Screen" ); @@ -967,6 +978,19 @@ class DebugLineResetKeyMapping : public IDebugLine } }; +class DebugLineMuteActions : public IDebugLine +{ + virtual RString GetDisplayTitle() { return MUTE_ACTIONS.GetValue(); } + virtual RString GetDisplayValue() { return RString(); } + virtual bool IsEnabled() { return PREFSMAN->m_MuteActions; } + virtual void DoAndLog( RString &sMessageOut ) + { + PREFSMAN->m_MuteActions.Set(!PREFSMAN->m_MuteActions); + SCREENMAN->SystemMessage(PREFSMAN->m_MuteActions ? MUTE_ACTIONS_ON.GetValue() : MUTE_ACTIONS_OFF.GetValue()); + IDebugLine::DoAndLog( sMessageOut ); + } +}; + class DebugLineReloadCurrentScreen : public IDebugLine { virtual RString GetDisplayTitle() { return RELOAD.GetValue(); } @@ -1288,6 +1312,7 @@ DECLARE_ONE( DebugLineVisualDelayUp ); DECLARE_ONE( DebugLineForceCrash ); DECLARE_ONE( DebugLineUptime ); DECLARE_ONE( DebugLineResetKeyMapping ); +DECLARE_ONE( DebugLineMuteActions ); /* diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 763f50fbd2..c90a9d133a 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -2006,7 +2006,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) int iHeadRow; if( m_NoteDataEdit.IsHoldNoteAtRow( iCol, iSongIndex, &iHeadRow ) ) { - m_soundRemoveNote.Play(); + m_soundRemoveNote.Play(true); SetDirty( true ); SaveUndo(); m_NoteDataEdit.SetTapNote( iCol, iHeadRow, TAP_EMPTY ); @@ -2014,7 +2014,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) } else if( m_NoteDataEdit.GetTapNote(iCol, iSongIndex).type != TapNoteType_Empty ) { - m_soundRemoveNote.Play(); + m_soundRemoveNote.Play(true); SetDirty( true ); SaveUndo(); m_NoteDataEdit.SetTapNote( iCol, iSongIndex, TAP_EMPTY ); @@ -2027,7 +2027,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) } else { - m_soundAddNote.Play(); + m_soundAddNote.Play(true); SetDirty( true ); SaveUndo(); TapNote tn = m_selectedTap; @@ -2107,7 +2107,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) if( fSpeeds[iSpeed] != fScrollSpeed ) { - m_soundMarker.Play(); + m_soundMarker.Play(true); fScrollSpeed = fSpeeds[iSpeed]; } @@ -2238,7 +2238,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) m_NoteFieldEdit.m_iBeginMarker = iCurrentRow; m_NoteFieldEdit.m_iEndMarker = -1; } - m_soundMarker.Play(); + m_soundMarker.Play(true); } return true; case EDIT_BUTTON_OPEN_AREA_MENU: @@ -2341,7 +2341,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) it - vSteps.begin() + 1, int(vSteps.size()) ); SCREENMAN->SystemMessage( s ); - m_soundSwitchSteps.Play(); + m_soundSwitchSteps.Play(true); ScrollTo( GetAppropriateTiming().GetBeatFromElapsedTime(curSecond) ); } @@ -2374,7 +2374,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) { GetAppropriateTimingForUpdate().AddSegment(BPMSegment(GetRow(), fNewBPM)); } - (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(); + (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(true); SetDirty( true ); } return true; @@ -2419,7 +2419,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) stops.erase( stops.begin()+i, stops.begin()+i+1); } - (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(); + (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(true); SetDirty( true ); } return true; @@ -2465,7 +2465,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) stops.erase( stops.begin()+i, stops.begin()+i+1); } - (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(); + (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(true); SetDirty( true ); } return true; @@ -2491,7 +2491,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) fDelta *= 40; } GetAppropriateTimingForUpdate().m_fBeat0OffsetInSeconds += fDelta; - (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(); + (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(true); if (GAMESTATE->m_bIsUsingStepTiming) { GAMESTATE->m_pCurSteps[PLAYER_1]->m_Attacks.UpdateStartTimes(fDelta); @@ -2537,7 +2537,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) m_pSong->m_fMusicSampleStartSeconds += fDelta; m_pSong->m_fMusicSampleStartSeconds = max(m_pSong->m_fMusicSampleStartSeconds,0); } - (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(); + (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(true); SetDirty( true ); } return true; @@ -2822,7 +2822,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) } bgChange.m_def.m_sFile1 = sName; m_pSong->AddBackgroundChange( iLayer, bgChange ); - m_soundMarker.Play(); + m_soundMarker.Play(true); } } return true; @@ -2928,12 +2928,12 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) enum_add( m_InputPlayerNumber, 1 ); if( m_InputPlayerNumber == NUM_PLAYERS ) m_InputPlayerNumber = PLAYER_1; - m_soundSwitchPlayer.Play(); + m_soundSwitchPlayer.Play(true); return true; case EDIT_BUTTON_SWITCH_TIMINGS: GAMESTATE->m_bIsUsingStepTiming = !GAMESTATE->m_bIsUsingStepTiming; - m_soundSwitchTiming.Play(); + m_soundSwitchTiming.Play(true); return true; default: return false; @@ -3347,7 +3347,7 @@ void ScreenEdit::TransitionEditState( EditState em ) p.m_StartSecond = fStartSeconds; p.StopMode = RageSoundParams::M_CONTINUE; m_pSoundMusic->SetProperty( "AccurateSync", true ); - m_pSoundMusic->Play( &p ); + m_pSoundMusic->Play(false, &p); break; } default: break; @@ -3419,7 +3419,7 @@ void ScreenEdit::ScrollTo( float fDestinationBeat ) } } - m_soundChangeLine.Play(); + m_soundChangeLine.Play(true); } static LocalizedString NEW_KEYSOUND_FILE("ScreenEdit", "Enter New Keysound File"); @@ -4240,7 +4240,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) void ScreenEdit::OnSnapModeChange() { - m_soundChangeSnap.Play(); + m_soundChangeSnap.Play(true); NoteType nt = m_SnapDisplay.GetNoteType(); int iStepIndex = BeatToNoteRow( GetBeat() ); @@ -4535,7 +4535,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns else { m_NoteFieldEdit.m_iBeginMarker = iCurrentRow; - m_soundMarker.Play(); + m_soundMarker.Play(true); } } break; @@ -4549,7 +4549,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns else { m_NoteFieldEdit.m_iEndMarker = iCurrentRow; - m_soundMarker.Play(); + m_soundMarker.Play(true); } } break; @@ -4696,7 +4696,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns break; } - m_soundSave.Play(); + m_soundSave.Play(true); } break; case revert_to_last_save: diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index 4bbf75fc84..69c25a4217 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -773,7 +773,7 @@ bool ScreenEvaluation::MenuStart( const InputEventPlus &input ) if( IsTransitioning() ) return false; - m_soundStart.Play(); + m_soundStart.Play(true); HandleMenuStart(); return true; diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 6567f96ab3..e66e053800 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -1477,7 +1477,7 @@ void ScreenGameplay::StartPlayingSong( float fMinTimeToNotes, float fMinTimeToMu p.m_LengthSeconds = fSecondsToStartFadingOutMusic + MUSIC_FADE_OUT_SECONDS - p.m_StartSecond; } } - m_pSoundMusic->Play( &p ); + m_pSoundMusic->Play(false, &p); if( m_bPaused ) m_pSoundMusic->Pause( true ); @@ -1592,7 +1592,7 @@ void ScreenGameplay::BeginScreen() p.StopMode = RageSoundParams::M_CONTINUE; p.m_StartSecond = startOffset; m_pSoundMusic->SetProperty( "AccurateSync", true ); - m_pSoundMusic->Play( &p ); + m_pSoundMusic->Play(false, &p); UpdateSongPosition(0); } @@ -2854,9 +2854,9 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) { int iTrickLevel = SM-SM_BattleTrickLevel1+1; PlayAnnouncer( ssprintf("gameplay battle trick level%d",iTrickLevel), 3 ); - if( SM == SM_BattleTrickLevel1 ) m_soundBattleTrickLevel1.Play(); - else if( SM == SM_BattleTrickLevel2 ) m_soundBattleTrickLevel2.Play(); - else if( SM == SM_BattleTrickLevel3 ) m_soundBattleTrickLevel3.Play(); + if( SM == SM_BattleTrickLevel1 ) m_soundBattleTrickLevel1.Play(false); + else if( SM == SM_BattleTrickLevel2 ) m_soundBattleTrickLevel2.Play(false); + else if( SM == SM_BattleTrickLevel3 ) m_soundBattleTrickLevel3.Play(false); } else if( SM >= SM_BattleDamageLevel1 && SM <= SM_BattleDamageLevel3 ) { diff --git a/src/ScreenManager.cpp b/src/ScreenManager.cpp index 762dc7a58a..403d1acd7c 100644 --- a/src/ScreenManager.cpp +++ b/src/ScreenManager.cpp @@ -866,7 +866,7 @@ void ScreenManager::ZeroNextUpdate() { \ RageSoundParams p; \ p.m_bIsCriticalSound = true; \ - snd.Play(&p); \ + snd.Play(false, &p); \ } /* Always play these sounds, even if we're in a silent attract loop. */ diff --git a/src/ScreenMapControllers.cpp b/src/ScreenMapControllers.cpp index a3d0689a45..a477a6afb0 100644 --- a/src/ScreenMapControllers.cpp +++ b/src/ScreenMapControllers.cpp @@ -449,7 +449,7 @@ bool ScreenMapControllers::Input( const InputEventPlus &input ) INPUTMAPPER->AddDefaultMappingsForCurrentGameIfUnmapped(); - m_soundDelete.Play(); + m_soundDelete.Play(true); bHandled = true; } break; @@ -469,7 +469,7 @@ bool ScreenMapControllers::Input( const InputEventPlus &input ) --m_CurSlot; } AfterChangeFocus(); - m_soundChange.Play(); + m_soundChange.Play(true); bHandled = true; break; case KEY_RIGHT: // Move the selection right, wrapping down. @@ -485,7 +485,7 @@ bool ScreenMapControllers::Input( const InputEventPlus &input ) m_CurController++; } AfterChangeFocus(); - m_soundChange.Play(); + m_soundChange.Play(true); bHandled = true; break; case KEY_UP: // Move the selection up. @@ -496,7 +496,7 @@ bool ScreenMapControllers::Input( const InputEventPlus &input ) BeforeChangeFocus(); m_CurButton--; AfterChangeFocus(); - m_soundChange.Play(); + m_soundChange.Play(true); bHandled = true; break; case KEY_DOWN: // Move the selection down. @@ -507,7 +507,7 @@ bool ScreenMapControllers::Input( const InputEventPlus &input ) BeforeChangeFocus(); m_CurButton++; AfterChangeFocus(); - m_soundChange.Play(); + m_soundChange.Play(true); bHandled = true; break; case KEY_ESC: // Quit the screen. diff --git a/src/ScreenNameEntry.cpp b/src/ScreenNameEntry.cpp index a9ecccddc2..4c947274d0 100644 --- a/src/ScreenNameEntry.cpp +++ b/src/ScreenNameEntry.cpp @@ -352,7 +352,7 @@ bool ScreenNameEntry::Input( const InputEventPlus &input ) if( iStringIndex != -1 ) { m_ReceptorArrowRow[input.pn].Step( iCol, TNS_W1 ); - m_soundStep.Play(); + m_soundStep.Play(true); char c = m_Text[input.pn].GetClosestChar( m_fFakeBeat ); m_textSelectedChars[input.pn][iCol].SetText( RString(1, c) ); m_sSelectedName[input.pn][iStringIndex] = c; @@ -391,7 +391,7 @@ bool ScreenNameEntry::MenuStart( const InputEventPlus &input ) m_bStillEnteringName[pn] = false; m_Text[pn].SetDone(); - m_soundStep.Play(); + m_soundStep.Play(true); // save last used ranking name Profile* pProfile = PROFILEMAN->GetProfile(pn); diff --git a/src/ScreenOptions.cpp b/src/ScreenOptions.cpp index 176d96f80e..3395c43579 100644 --- a/src/ScreenOptions.cpp +++ b/src/ScreenOptions.cpp @@ -811,7 +811,7 @@ bool ScreenOptions::MenuStart( const InputEventPlus &input ) if( bHoldingLeftAndRight ) { if( MoveRowRelative(pn, -1, input.type != IET_FIRST_PRESS) ) - m_SoundPrevRow.Play(); + m_SoundPrevRow.Play(true); return true; } } @@ -902,9 +902,9 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input ) } if( bSelected ) - m_SoundToggleOn.Play(); + m_SoundToggleOn.Play(true); else - m_SoundToggleOff.Play(); + m_SoundToggleOff.Play(true); m_pRows[iCurRow]->PositionUnderlines( pn ); RefreshIcons( iCurRow, pn ); @@ -957,7 +957,7 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input ) /* Jump to the exit row. (If everyone's already on the exit row, then * we'll have already gone to the next screen above.) */ if( MoveRowAbsolute(pn, m_pRows.size()-1) ) - m_SoundNextRow.Play(); + m_SoundNextRow.Play(true); break; } @@ -1054,9 +1054,9 @@ void ScreenOptions::ChangeValueInRowRelative( int iRow, PlayerNumber pn, int iDe if( MoveRowRelative(pn, iDelta, bRepeat) ) { if( iDelta < 0 ) - m_SoundPrevRow.Play(); + m_SoundPrevRow.Play(true); else - m_SoundNextRow.Play(); + m_SoundNextRow.Play(true); } return; } @@ -1129,7 +1129,7 @@ void ScreenOptions::ChangeValueInRowRelative( int iRow, PlayerNumber pn, int iDe } if( bOneChanged ) - m_SoundChangeCol.Play(); + m_SoundChangeCol.Play(true); if( row.GetRowDef().m_bExportOnChange ) { @@ -1322,9 +1322,9 @@ void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir ) if( MoveRowRelative(pn, iDir, input.type != IET_FIRST_PRESS) ) { if( iDir < 0 ) - m_SoundPrevRow.Play(); + m_SoundPrevRow.Play(true); else - m_SoundNextRow.Play(); + m_SoundNextRow.Play(true); } } diff --git a/src/ScreenOptionsCourseOverview.cpp b/src/ScreenOptionsCourseOverview.cpp index a204cecc88..285eb274d7 100644 --- a/src/ScreenOptionsCourseOverview.cpp +++ b/src/ScreenOptionsCourseOverview.cpp @@ -139,7 +139,7 @@ void ScreenOptionsCourseOverview::HandleScreenMessage( const ScreenMessage SM ) if( EditCourseUtil::RenameAndSave( GAMESTATE->m_pCurCourse, ScreenTextEntry::s_sLastAnswer ) ) { - m_soundSave.Play(); + m_soundSave.Play(true); SCREENMAN->SystemMessage( COURSE_SAVED ); } } @@ -236,7 +236,7 @@ void ScreenOptionsCourseOverview::ProcessMenuStart( const InputEventPlus &input { if( EditCourseUtil::Save( GAMESTATE->m_pCurCourse ) ) { - m_soundSave.Play(); + m_soundSave.Play(true); SCREENMAN->SystemMessage( COURSE_SAVED ); } else diff --git a/src/ScreenOptionsManageCourses.cpp b/src/ScreenOptionsManageCourses.cpp index 6482e80bc8..becc2584b2 100644 --- a/src/ScreenOptionsManageCourses.cpp +++ b/src/ScreenOptionsManageCourses.cpp @@ -217,7 +217,7 @@ bool ScreenOptionsManageCourses::MenuSelect( const InputEventPlus &input ) if( input.type != IET_FIRST_PRESS ) return false; SetNextCombination(); - m_soundDifficultyChanged.Play(); + m_soundDifficultyChanged.Play(true); return true; } diff --git a/src/ScreenOptionsReviewWorkout.cpp b/src/ScreenOptionsReviewWorkout.cpp index d4e0431f52..49dc09a90e 100644 --- a/src/ScreenOptionsReviewWorkout.cpp +++ b/src/ScreenOptionsReviewWorkout.cpp @@ -114,7 +114,7 @@ void ScreenOptionsCourseOverview::HandleScreenMessage( const ScreenMessage SM ) if( EditCourseUtil::RenameAndSave( GAMESTATE->m_pCurCourse, ScreenTextEntry::s_sLastAnswer ) ) { - m_soundSave.Play(); + m_soundSave.Play(true); SCREENMAN->SystemMessage( WORKOUT_SAVED ); } } @@ -169,7 +169,7 @@ void ScreenOptionsCourseOverview::ProcessMenuStart( const InputEventPlus &input { if( EditCourseUtil::Save( GAMESTATE->m_pCurCourse ) ) { - m_soundSave.Play(); + m_soundSave.Play(true); SCREENMAN->SystemMessage( WORKOUT_SAVED ); } else diff --git a/src/ScreenPrompt.cpp b/src/ScreenPrompt.cpp index 94dd89d561..c11056049e 100644 --- a/src/ScreenPrompt.cpp +++ b/src/ScreenPrompt.cpp @@ -160,7 +160,7 @@ void ScreenPrompt::Change( int dir ) PositionCursor(); - m_sndChange.Play(); + m_sndChange.Play(true); } bool ScreenPrompt::MenuLeft( const InputEventPlus &input ) diff --git a/src/ScreenSelectCharacter.cpp b/src/ScreenSelectCharacter.cpp index 401097b4a9..872bb4acdc 100644 --- a/src/ScreenSelectCharacter.cpp +++ b/src/ScreenSelectCharacter.cpp @@ -309,7 +309,7 @@ void ScreenSelectCharacter::Move( PlayerNumber pn, int deltaValue ) m_iSelectedCharacter[pnAffected] += deltaValue; wrap( m_iSelectedCharacter[pnAffected], apCharacters.size() ); AfterValueChange(pn); - m_soundChange.Play(); + m_soundChange.Play(true); break; } default: break; diff --git a/src/ScreenSelectLanguage.cpp b/src/ScreenSelectLanguage.cpp index 9fbe5338b5..8b3000c8d4 100644 --- a/src/ScreenSelectLanguage.cpp +++ b/src/ScreenSelectLanguage.cpp @@ -50,7 +50,7 @@ bool ScreenSelectLanguage::MenuStart( const InputEventPlus &input ) PREFSMAN->SavePrefsToDisk(); THEME->SwitchThemeAndLanguage( THEME->GetCurThemeName(), PREFSMAN->m_sLanguage, PREFSMAN->m_bPseudoLocalize ); - m_soundStart.Play(); + m_soundStart.Play(true); this->PostScreenMessage( SM_BeginFadingOut, 0 ); return true; } diff --git a/src/ScreenSelectMaster.cpp b/src/ScreenSelectMaster.cpp index 43f90229c1..f4f42e7257 100644 --- a/src/ScreenSelectMaster.cpp +++ b/src/ScreenSelectMaster.cpp @@ -540,7 +540,7 @@ bool ScreenSelectMaster::MenuLeft( const InputEventPlus &input ) if( Move(pn, MenuDir_Left) ) { m_TrackingRepeatingInput = input.MenuI; - m_soundChange.Play(); + m_soundChange.Play(true); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuLeftP1+pn) ); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuSelectionChanged) ); @@ -571,7 +571,7 @@ bool ScreenSelectMaster::MenuRight( const InputEventPlus &input ) if( Move(pn, MenuDir_Right) ) { m_TrackingRepeatingInput = input.MenuI; - m_soundChange.Play(); + m_soundChange.Play(true); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuRightP1+pn) ); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuSelectionChanged) ); @@ -602,7 +602,7 @@ bool ScreenSelectMaster::MenuUp( const InputEventPlus &input ) if( Move(pn, MenuDir_Up) ) { m_TrackingRepeatingInput = input.MenuI; - m_soundChange.Play(); + m_soundChange.Play(true); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuUpP1+pn) ); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuSelectionChanged) ); @@ -633,7 +633,7 @@ bool ScreenSelectMaster::MenuDown( const InputEventPlus &input ) if( Move(pn, MenuDir_Down) ) { m_TrackingRepeatingInput = input.MenuI; - m_soundChange.Play(); + m_soundChange.Play(true); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuDownP1+pn) ); MESSAGEMAN->Broadcast( (MessageID)(Message_MenuSelectionChanged) ); diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index 985c019e5b..67793d059f 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -492,7 +492,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) m_bGoToOptions = true; if( PLAY_SOUND_ON_ENTERING_OPTIONS_MENU ) - m_soundStart.Play(); + m_soundStart.Play(true); this->PlayCommand( "ShowEnteringOptions" ); // Re-queue SM_BeginFadingOut, since ShowEnteringOptions may have @@ -573,7 +573,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) if( MODE_MENU_AVAILABLE ) m_MusicWheel.NextSort(); else - m_soundLocked.Play(); + m_soundLocked.Play(true); break; default: break; } @@ -679,14 +679,14 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) if (input.MenuI == m_GameButtonPreviousDifficulty ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else ChangeSteps( input.pn, -1 ); } else if( input.MenuI == m_GameButtonNextDifficulty ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else ChangeSteps( input.pn, +1 ); } @@ -705,7 +705,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) if(input.MenuI == m_GameButtonPreviousGroup ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { RString sNewGroup = m_MusicWheel.JumpToPrevGroup(); @@ -718,7 +718,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) else if(input.MenuI == m_GameButtonNextGroup ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { RString sNewGroup = m_MusicWheel.JumpToNextGroup(); @@ -740,7 +740,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) if( input.MenuI == m_GameButtonPreviousSong ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { m_SelectionState = SelectionState_SelectingSong; @@ -752,7 +752,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) else if( input.MenuI == m_GameButtonNextSong ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { m_SelectionState = SelectionState_SelectingSong; @@ -765,7 +765,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) else if( input.MenuI == m_GameButtonPreviousDifficulty ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { m_SelectionState = SelectionState_SelectingSong; @@ -776,7 +776,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) else if( input.MenuI == m_GameButtonNextDifficulty ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { m_SelectionState = SelectionState_SelectingSong; @@ -788,7 +788,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) else if(input.MenuI == m_GameButtonPreviousGroup ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { RString sNewGroup = m_MusicWheel.JumpToPrevGroup(); @@ -802,7 +802,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) else if(input.MenuI == m_GameButtonNextGroup ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { RString sNewGroup = m_MusicWheel.JumpToNextGroup(); @@ -824,14 +824,14 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) if( input.MenuI == m_GameButtonPreviousSong ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else ChangeSteps( input.pn, -1 ); } else if( input.MenuI == m_GameButtonNextSong ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else ChangeSteps( input.pn, +1 ); } @@ -839,7 +839,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input ) else if( input.MenuI == GAME_BUTTON_MENUUP || input.MenuI == GAME_BUTTON_MENUDOWN ) // && TWO_PART_DESELECTS_WITH_MENUUPDOWN { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { // XXX: should this be called "TwoPartCancelled"? @@ -869,14 +869,14 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input ) if( CodeDetector::EnteredPrevSteps(input.GameI.controller) && !CHANGE_STEPS_WITH_GAME_BUTTONS ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else ChangeSteps( input.pn, -1 ); } else if( CodeDetector::EnteredNextSteps(input.GameI.controller) && !CHANGE_STEPS_WITH_GAME_BUTTONS ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else ChangeSteps( input.pn, +1 ); } @@ -885,19 +885,19 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input ) if( MODE_MENU_AVAILABLE ) m_MusicWheel.ChangeSort( SORT_MODE_MENU ); else - m_soundLocked.Play(); + m_soundLocked.Play(true); } else if( CodeDetector::EnteredNextSort(input.GameI.controller) ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else if( !GAMESTATE->IsCourseMode() ) // Only change sorts in non-course mode m_MusicWheel.NextSort(); } else if( !GAMESTATE->IsAnExtraStageAndSelectionLocked() && CodeDetector::DetectAndAdjustMusicOptions(input.GameI.controller) ) { - m_soundOptionsChange.Play(); + m_soundOptionsChange.Play(true); Message msg( "PlayerOptionsChanged" ); msg.SetParam( "PlayerNumber", input.pn ); @@ -908,7 +908,7 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input ) else if( CodeDetector::EnteredNextGroup(input.GameI.controller) && !CHANGE_GROUPS_WITH_GAME_BUTTONS ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { RString sNewGroup = m_MusicWheel.JumpToNextGroup(); @@ -921,7 +921,7 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input ) else if( CodeDetector::EnteredPrevGroup(input.GameI.controller) && !CHANGE_GROUPS_WITH_GAME_BUTTONS ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { RString sNewGroup = m_MusicWheel.JumpToPrevGroup(); @@ -934,7 +934,7 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input ) else if( CodeDetector::EnteredCloseFolder(input.GameI.controller) ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) - m_soundLocked.Play(); + m_soundLocked.Play(true); else { RString sCurSection = m_MusicWheel.GetSelectedSection(); @@ -1377,7 +1377,7 @@ bool ScreenSelectMusic::MenuStart( const InputEventPlus &input ) if( !bAllPlayersDoneSelectingSteps ) { m_bStepsChosen[pn] = true; - m_soundStart.Play(); + m_soundStart.Play(true); // impldiff: Pump it Up Pro uses "StepsSelected". -aj Message msg("StepsChosen"); @@ -1403,7 +1403,7 @@ bool ScreenSelectMusic::MenuStart( const InputEventPlus &input ) Message msg( "Start" + SelectionStateToString(m_SelectionState) ); MESSAGEMAN->Broadcast( msg ); - m_soundStart.Play(); + m_soundStart.Play(true); // If the MenuTimer has forced us to move on && TWO_PART_CONFIRMS_ONLY, // set Selection State to finalized and move on. @@ -1425,7 +1425,7 @@ bool ScreenSelectMusic::MenuStart( const InputEventPlus &input ) { m_bStepsChosen[p] = true; // Don't play start sound. We play it again below on finalized - //m_soundStart.Play(); + //m_soundStart.Play(true); Message lMsg("StepsChosen"); lMsg.SetParam( "Player", p ); diff --git a/src/ScreenSetTime.cpp b/src/ScreenSetTime.cpp index 4062f07c6c..9c0980fb33 100644 --- a/src/ScreenSetTime.cpp +++ b/src/ScreenSetTime.cpp @@ -137,7 +137,7 @@ void ScreenSetTime::ChangeValue( int iDirection ) m_TimeOffset = iAdjusted - iNow; - m_soundChangeValue.Play(); + m_soundChangeValue.Play(true); } void ScreenSetTime::ChangeSelection( int iDirection ) @@ -156,7 +156,7 @@ void ScreenSetTime::ChangeSelection( int iDirection ) RageColor(1,1,1,1) ); if( iDirection != 0 ) - m_soundChangeSelection.Play(); + m_soundChangeSelection.Play(true); } bool ScreenSetTime::MenuUp( const InputEventPlus &input ) diff --git a/src/ScreenTestSound.cpp b/src/ScreenTestSound.cpp index 7d86c8b811..1210b2ea58 100644 --- a/src/ScreenTestSound.cpp +++ b/src/ScreenTestSound.cpp @@ -57,7 +57,7 @@ void ScreenTestSound::Init() s[i].s.SetParams( p ); //s[0].s.SetStopMode(RageSound::M_LOOP); -//s[0].s.Play(); +//s[0].s.Play(false); selected = 0; for( int i = 0; i < nsounds; ++i ) @@ -149,7 +149,7 @@ bool ScreenTestSound::Input( const InputEventPlus &input ) * and we won't be allowed to touch it. Copy it ourself. */ RageSound *pCopy = new RageSound( s[selected].s ); m_sSoundCopies[selected].push_back( pCopy ); - pCopy->Play(); + pCopy->Play(false); break; } case 's': diff --git a/src/ScreenTextEntry.cpp b/src/ScreenTextEntry.cpp index 79c37c8b37..f8d37b687b 100644 --- a/src/ScreenTextEntry.cpp +++ b/src/ScreenTextEntry.cpp @@ -278,7 +278,7 @@ void ScreenTextEntry::TryAppendToAnswer( RString s ) wstring sNewAnswer = m_sAnswer+RStringToWstring(s); m_sAnswer = sNewAnswer; - m_sndType.Play(); + m_sndType.Play(true); UpdateAnswerText(); } @@ -290,7 +290,7 @@ void ScreenTextEntry::BackspaceInAnswer() return; } m_sAnswer.erase( m_sAnswer.end()-1 ); - m_sndBackspace.Play(); + m_sndBackspace.Play(true); UpdateAnswerText(); } @@ -703,7 +703,7 @@ void ScreenTextEntryVisual::MoveX( int iDir ) } while( sKey == "" ); - m_sndChange.Play(); + m_sndChange.Play(true); PositionCursor(); } @@ -735,7 +735,7 @@ void ScreenTextEntryVisual::MoveY( int iDir ) } while( sKey == "" ); - m_sndChange.Play(); + m_sndChange.Play(true); PositionCursor(); } diff --git a/src/ScreenUnlockBrowse.cpp b/src/ScreenUnlockBrowse.cpp index 9eabc836cf..20219bcc72 100644 --- a/src/ScreenUnlockBrowse.cpp +++ b/src/ScreenUnlockBrowse.cpp @@ -48,7 +48,7 @@ void ScreenUnlockBrowse::BeginScreen() bool ScreenUnlockBrowse::MenuStart( const InputEventPlus &input ) { - m_soundStart.Play(); + m_soundStart.Play(true); this->PostScreenMessage( SM_BeginFadingOut, 0 ); return true; } diff --git a/src/WheelBase.cpp b/src/WheelBase.cpp index 8adb5fd205..fd25b3cdcb 100644 --- a/src/WheelBase.cpp +++ b/src/WheelBase.cpp @@ -233,14 +233,14 @@ void WheelBase::Update( float fDeltaTime ) ChangeMusic( m_Moving ); if( PREFSMAN->m_iMusicWheelSwitchSpeed < MAX_WHEEL_SOUND_SPEED ) - m_soundChangeMusic.Play(); + m_soundChangeMusic.Play(true); } if( PREFSMAN->m_iMusicWheelSwitchSpeed >= MAX_WHEEL_SOUND_SPEED && m_MovingSoundTimer.PeekDeltaTime() >= 1.0f / MAX_WHEEL_SOUND_SPEED ) { m_MovingSoundTimer.GetDeltaTime(); - m_soundChangeMusic.Play(); + m_soundChangeMusic.Play(true); } } else @@ -297,12 +297,12 @@ bool WheelBase::Select() // return true if this selection can end the screen if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded { SetOpenSection( "" ); // collapse it - m_soundCollapse.Play(); + m_soundCollapse.Play(true); } else // already collapsed { SetOpenSection( sThisItemSectionName ); // expand it - m_soundExpand.Play(); + m_soundExpand.Play(true); } } // Opening/closing sections cannot end the screen @@ -357,7 +357,7 @@ void WheelBase::ChangeMusicUnlessLocked( int n ) { int iSign = n/abs(n); m_fLockedWheelVelocity = iSign*LOCKED_INITIAL_VELOCITY; - m_soundLocked.Play(); + m_soundLocked.Play(true); } return; } @@ -376,7 +376,7 @@ void WheelBase::Move(int n) { int iSign = n/abs(n); m_fLockedWheelVelocity = iSign*LOCKED_INITIAL_VELOCITY; - m_soundLocked.Play(); + m_soundLocked.Play(true); } return; } @@ -441,7 +441,7 @@ void WheelBase::ChangeMusic( int iDist ) /* If we're moving automatically, don't play this; it'll be called in Update. */ if(!IsMoving()) - m_soundChangeMusic.Play(); + m_soundChangeMusic.Play(true); } void WheelBase::RebuildWheelItems( int iDist )