SOUNDMAN -> SOUND

RageSoundManager.h -> RageSounds.h
This commit is contained in:
Glenn Maynard
2003-07-26 22:53:22 +00:00
parent beca62eee1
commit 3aea7c8a3e
13 changed files with 66 additions and 66 deletions
+2 -2
View File
@@ -17,7 +17,7 @@
#include "RageSound.h"
#include "ThemeManager.h"
#include "ScreenManager.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
Screen::Screen( CString sName )
{
@@ -204,7 +204,7 @@ bool Screen::JoinInput( const DeviceInput& DeviceI, const InputEventType type, c
SCREENMAN->RefreshCreditsMessages();
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common start") );
SOUND->PlayOnce( THEME->GetPathToS("Common start") );
return true;
}
+2 -2
View File
@@ -13,7 +13,7 @@
#include "ScreenAppearanceOptions.h"
#include "RageTextureManager.h"
#include "RageUtil.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "GameConstantsAndTypes.h"
@@ -68,7 +68,7 @@ ScreenAppearanceOptions::ScreenAppearanceOptions() :
false, true );
m_Menu.m_MenuTimer.Disable();
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenAppearanceOptions music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenAppearanceOptions music") );
}
void ScreenAppearanceOptions::ImportOptions()
+6 -6
View File
@@ -24,7 +24,7 @@
#include "InputMapper.h"
#include "ThemeManager.h"
#include "SDL_utils.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#define NEXT_SCREEN THEME->GetMetric(m_sName,"NextScreen")
@@ -47,11 +47,11 @@ ScreenAttract::ScreenAttract( CString sClassName ) : Screen( sClassName )
m_Out.Load( THEME->GetPathToB("ScreenAttract out") );
this->AddChild( &m_Out );
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(m_sName) );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(m_sName) );
m_soundStart.Load( THEME->GetPathToS("Common start") );
SOUNDMAN->PlayMusic( THEME->GetPathToS(m_sName + " music") ); // DO loop. -Chris
SOUND->PlayMusic( THEME->GetPathToS(m_sName + " music") );
GAMESTATE->m_bPlayersCanJoin = true;
@@ -96,10 +96,10 @@ void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventTy
// fall through
case COIN_HOME:
case COIN_FREE:
SOUNDMAN->StopMusic();
SOUND->StopMusic();
/* We already played the it was a coin was inserted. Don't play it again. */
if( MenuI.button != MENU_BUTTON_COIN )
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common coin") );
SOUND->PlayOnce( THEME->GetPathToS("Common coin") );
SDL_Delay( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
@@ -152,7 +152,7 @@ void ScreenAttract::HandleScreenMessage( const ScreenMessage SM )
/* But if you don't stop it, for screens that have their own unique
* music, it will constantly loop even after the screen has gone on
* to the next attract screen. -- Miryokuteki */
SOUNDMAN->PlayMusic( "" );
SOUND->PlayMusic( "" );
SCREENMAN->SetNewScreen( NEXT_SCREEN );
break;
}
+2 -2
View File
@@ -12,7 +12,7 @@
#include "ScreenAutogenOptions.h"
#include "RageUtil.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "GameConstantsAndTypes.h"
@@ -45,7 +45,7 @@ ScreenAutogenOptions::ScreenAutogenOptions() :
false, true );
m_Menu.m_MenuTimer.Disable();
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenAutogenOptions music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenAutogenOptions music") );
}
void ScreenAutogenOptions::ImportOptions()
+2 -2
View File
@@ -13,7 +13,7 @@
#include "ScreenBackgroundOptions.h"
#include "RageUtil.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "GameConstantsAndTypes.h"
@@ -52,7 +52,7 @@ ScreenBackgroundOptions::ScreenBackgroundOptions() :
false, true );
m_Menu.m_MenuTimer.Disable();
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") );
SOUNDS->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") );
}
void ScreenBackgroundOptions::ImportOptions()
+4 -4
View File
@@ -16,7 +16,7 @@
#include "ScreenManager.h"
#include "AnnouncerManager.h"
#include "GameState.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "ThemeManager.h"
@@ -52,7 +52,7 @@ ScreenCaution::ScreenCaution() : Screen( "ScreenCaution" )
this->PostScreenMessage( SM_StartClosing, m_Background.GetLengthSeconds()-m_Out.GetLengthSeconds() );
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenCaution music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenCaution music") );
}
@@ -77,7 +77,7 @@ void ScreenCaution::HandleScreenMessage( const ScreenMessage SM )
}
break;
case SM_DoneOpening:
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("caution") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("caution") );
break;
case SM_GoToPrevScreen:
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
@@ -103,6 +103,6 @@ void ScreenCaution::MenuBack( PlayerNumber pn )
return;
this->ClearMessageQueue();
m_Back.StartTransitioning( SM_GoToPrevScreen );
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common back") );
SOUND->PlayOnce( THEME->GetPathToS("Common back") );
}
+3 -3
View File
@@ -13,7 +13,7 @@
#include "ScreenCredits.h"
#include "ScreenManager.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "RageLog.h"
#include "GameConstantsAndTypes.h"
#include "SongManager.h"
@@ -238,9 +238,9 @@ ScreenCredits::ScreenCredits() : Screen("ScreenCredits")
this->PostScreenMessage( SM_BeginFadingOut, m_ScrollerTexts.GetTotalSecsToScroll() );
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("credits") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("credits") );
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenCredits music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenCredits music") );
}
ScreenCredits::~ScreenCredits()
+8 -8
View File
@@ -19,7 +19,7 @@
#include "GameManager.h"
#include "GameConstantsAndTypes.h"
#include "RageLog.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "GameState.h"
#include "InputMapper.h"
#include "RageLog.h"
@@ -335,7 +335,7 @@ bool ScreenEdit::PlayTicks() const
float fPositionSeconds = GAMESTATE->m_fMusicSeconds;
// HACK: Play the sound a little bit early to account for the fact that the middle of the tick sounds occurs 0.015 seconds into playing.
fPositionSeconds += (SOUNDMAN->GetPlayLatency()+(float)TICK_EARLY_SECONDS) * m_soundMusic.GetPlaybackRate();
fPositionSeconds += (SOUND->GetPlayLatency()+(float)TICK_EARLY_SECONDS) * m_soundMusic.GetPlaybackRate();
float fSongBeat=GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
int iRowNow = BeatToNoteRowNotRounded( fSongBeat );
@@ -354,8 +354,8 @@ bool ScreenEdit::PlayTicks() const
void ScreenEdit::PlayPreviewMusic()
{
SOUNDMAN->PlayMusic("");
SOUNDMAN->PlayMusic( m_pSong->GetMusicPath(), false,
SOUND->PlayMusic("");
SOUND->PlayMusic( m_pSong->GetMusicPath(), false,
m_pSong->m_fMusicSampleStartSeconds,
m_pSong->m_fMusicSampleLengthSeconds,
1.5f );
@@ -1252,7 +1252,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, int* iAnswers )
GAMESTATE->m_pCurSong->Save();
SCREENMAN->SystemMessage( "Saved as SM and DWI." );
SOUNDMAN->PlayOnce( THEME->GetPathToS("ScreenEdit save") );
SOUND->PlayOnce( THEME->GetPathToS("ScreenEdit save") );
}
break;
case player_options:
@@ -1459,7 +1459,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
{
ASSERT( m_NoteFieldEdit.m_fBeginMarker!=-1 && m_NoteFieldEdit.m_fEndMarker!=-1 );
SOUNDMAN->PlayMusic("");
SOUND->PlayMusic("");
m_EditMode = MODE_PLAYING;
@@ -1484,7 +1484,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
{
ASSERT( m_NoteFieldEdit.m_fBeginMarker!=-1 && m_NoteFieldEdit.m_fEndMarker!=-1 );
SOUNDMAN->PlayMusic("");
SOUND->PlayMusic("");
m_EditMode = MODE_RECORDING;
@@ -1612,7 +1612,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, int* iAnswers )
change.m_sBGName = "";
break;
default:
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common invalid") );
SOUND->PlayOnce( THEME->GetPathToS("Common invalid") );
};
change.m_fRate = (float)atof( g_BGChange.rows[rate].choices[iAnswers[rate]] )/100.f;
+8 -8
View File
@@ -19,7 +19,7 @@
#include "GameManager.h"
#include "RageLog.h"
#include "GameState.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "ThemeManager.h"
#include "Notes.h"
@@ -54,7 +54,7 @@ ScreenEditMenu::ScreenEditMenu() : Screen("ScreenEditMenu")
m_textExplanation.SetZoom( 0.7f );
this->AddChild( &m_textExplanation );
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenEditMenu music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenEditMenu music") );
}
@@ -156,8 +156,8 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
case EditMenu::ACTION_EDIT:
// Prepare prepare for ScreenEdit
ASSERT( pNotes );
SOUNDMAN->StopMusic();
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common start") );
SOUND->StopMusic();
SOUND->PlayOnce( THEME->GetPathToS("Common start") );
m_Menu.StartTransitioning( SM_GoToNextScreen );
break;
case EditMenu::ACTION_DELETE:
@@ -177,7 +177,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
pSong->AddNotes( pNewNotes );
SCREENMAN->SystemMessage( "Notes created from copy." );
SOUNDMAN->PlayOnce( THEME->GetPathToS("ScreenEditMenu create") );
SOUND->PlayOnce( THEME->GetPathToS("ScreenEditMenu create") );
m_Selector.RefreshNotes();
pSong->Save();
}
@@ -195,7 +195,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
pSong->AddNotes( pNewNotes );
SCREENMAN->SystemMessage( "Notes created from AutoGen." );
SOUNDMAN->PlayOnce( THEME->GetPathToS("ScreenEditMenu create") );
SOUND->PlayOnce( THEME->GetPathToS("ScreenEditMenu create") );
m_Selector.RefreshNotes();
pSong->Save();
}
@@ -212,7 +212,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
pSong->AddNotes( pNewNotes );
SCREENMAN->SystemMessage( "Blank Notes created." );
SOUNDMAN->PlayOnce( THEME->GetPathToS("ScreenEditMenu create") );
SOUND->PlayOnce( THEME->GetPathToS("ScreenEditMenu create") );
m_Selector.RefreshNotes();
pSong->Save();
}
@@ -226,5 +226,5 @@ void ScreenEditMenu::MenuBack( PlayerNumber pn )
{
m_Menu.Back( SM_GoToPrevScreen );
SOUNDMAN->StopMusic();
SOUND->StopMusic();
}
+10 -10
View File
@@ -23,7 +23,7 @@
#include "GameState.h"
#include "GrooveRadar.h"
#include "ThemeManager.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "ActorUtil.h"
#include "RageTimer.h"
#include "UnlockSystem.h"
@@ -681,13 +681,13 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
this->AddChild( &m_sprTryExtraStage );
if( GAMESTATE->IsExtraStage() )
SOUNDMAN->PlayOnce( THEME->GetPathToS("ScreenEvaluation try extra2") );
SOUND->PlayOnce( THEME->GetPathToS("ScreenEvaluation try extra2") );
else
SOUNDMAN->PlayOnce( THEME->GetPathToS("ScreenEvaluation try extra1") );
SOUND->PlayOnce( THEME->GetPathToS("ScreenEvaluation try extra1") );
}
else if( bOneHasNewRecord && ANNOUNCER->HasSoundsFor("evaluation new record") )
{
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation new record") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation new record") );
}
else
{
@@ -701,19 +701,19 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
{
bool bWon = GAMESTATE->GetStageResult(GAMESTATE->m_MasterPlayerNumber) == RESULT_WIN;
if( bWon )
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation win") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation win") );
else
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation lose") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation lose") );
}
break;
default:
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation "+GradeToString(max_grade)) );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation "+GradeToString(max_grade)) );
break;
}
break;
case course:
case summary:
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation final "+GradeToString(max_grade)) );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation final "+GradeToString(max_grade)) );
break;
default:
ASSERT(0);
@@ -730,7 +730,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
}
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenEvaluation music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenEvaluation music") );
m_fScreenCreateTime = RageTimer::GetTimeSinceStart();
}
@@ -915,7 +915,7 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM )
SCREENMAN->SetNewScreen( "ScreenEvaluationSummary" );
break;
case SM_PlayCheer:
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation cheer") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation cheer") );
break;
}
}
+11 -11
View File
@@ -14,7 +14,7 @@
#include "ScreenEz2SelectMusic.h"
#include <math.h>
#include "ScreenManager.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "GameConstantsAndTypes.h"
#include "PrefsManager.h"
#include "ThemeManager.h"
@@ -84,7 +84,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
if(PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3)
{
if(PREVIEWMUSICMODE == 1)
SOUNDMAN->StopMusic();
SOUND->StopMusic();
iConfirmSelection = 0;
}
@@ -206,7 +206,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
MusicChanged();
}
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music intro") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music intro") );
}
void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
@@ -224,7 +224,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START )
{
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common start") );
SOUND->PlayOnce( THEME->GetPathToS("Common start") );
m_bGoToOptions = true;
m_sprOptionsMessage.SetState( 1 );
}
@@ -356,7 +356,7 @@ void ScreenEz2SelectMusic::HandleScreenMessage( const ScreenMessage SM )
}
else
{
SOUNDMAN->StopMusic();
SOUND->StopMusic();
SCREENMAN->SetNewScreen( "ScreenStage" );
}
break;
@@ -379,7 +379,7 @@ void ScreenEz2SelectMusic::MenuRight( PlayerNumber pn, const InputEventType type
void ScreenEz2SelectMusic::MenuBack( PlayerNumber pn )
{
SOUNDMAN->StopMusic();
SOUND->StopMusic();
m_Menu.Back( SM_GoToPrevScreen );
}
@@ -491,7 +491,7 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn )
m_ModeSwitcher.PrevMode(pn);
MusicChanged();
m_MusicBannerWheel.StopBouncing();
SOUNDMAN->StopMusic();
SOUND->StopMusic();
return;
}
@@ -507,7 +507,7 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn )
iConfirmSelection = 0;
m_MusicBannerWheel.StopBouncing();
if(PREVIEWMUSICMODE == 1)
SOUNDMAN->StopMusic();
SOUND->StopMusic();
}
m_iSelection[pn]--;
@@ -528,7 +528,7 @@ void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
m_ModeSwitcher.NextMode(pn);
MusicChanged();
m_MusicBannerWheel.StopBouncing();
SOUNDMAN->StopMusic();
SOUND->StopMusic();
return;
}
@@ -552,7 +552,7 @@ void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
m_MusicBannerWheel.StopBouncing();
if(PREVIEWMUSICMODE == 1)
SOUNDMAN->StopMusic();
SOUND->StopMusic();
}
m_iSelection[pn]++;
@@ -600,7 +600,7 @@ void ScreenEz2SelectMusic::MusicChanged()
{
iConfirmSelection = 0;
if(PREVIEWMUSICMODE == 1)
SOUNDMAN->StopMusic();
SOUND->StopMusic();
}
int pn;
+5 -5
View File
@@ -11,7 +11,7 @@ Andrew Livy
#include "ScreenEz2SelectPlayer.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "GameConstantsAndTypes.h"
#include "PrefsManager.h"
#include "GameManager.h"
@@ -94,9 +94,9 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer() : Screen("ScreenEz2SelectPlayer")
m_soundSelect.Load( THEME->GetPathToS("Common start") );
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select player intro") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("select player intro") );
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenSelectPlayer music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenSelectPlayer music") );
TweenOnScreen();
}
@@ -167,7 +167,7 @@ void ScreenEz2SelectPlayer::HandleScreenMessage( const ScreenMessage SM )
m_Menu.StartTransitioning( SM_GoToNextScreen );
break;
case SM_GoToPrevScreen:
SOUNDMAN->StopMusic();
SOUND->StopMusic();
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
case SM_GoToNextScreen:
@@ -185,7 +185,7 @@ presses the button bound to back
void ScreenEz2SelectPlayer::MenuBack( PlayerNumber pn )
{
SOUNDMAN->StopMusic();
SOUND->StopMusic();
m_Menu.Back( SM_GoToPrevScreen );
}
+3 -3
View File
@@ -14,7 +14,7 @@
#include "ScreenManager.h"
#include "AnnouncerManager.h"
#include "GameState.h"
#include "RageSoundManager.h"
#include "RageSounds.h"
#include "ThemeManager.h"
@@ -38,7 +38,7 @@ ScreenGameOver::ScreenGameOver() : Screen("ScreenGameOver")
m_Out.Load( THEME->GetPathToB("ScreenGameOver out") );
this->AddChild( &m_Out );
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenGameOver music") );
SOUND->PlayMusic( THEME->GetPathToS("ScreenGameOver music") );
m_In.StartTransitioning( SM_PlayAnnouncer );
this->PostScreenMessage( SM_StartFadingOut, m_Background.GetLengthSeconds() );
@@ -50,7 +50,7 @@ void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM )
switch( SM )
{
case SM_PlayAnnouncer:
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("game over") );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("game over") );
break;
case SM_StartFadingOut:
m_Out.StartTransitioning( SM_GoToNextScreen );