From 1b3425ea94b21c46f9c28f3b9a5c9b508d87b217 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 8 Jul 2004 00:03:35 +0000 Subject: [PATCH] renaming RageSounds -> GameSoundManager; it's not low-level --- stepmania/src/RageSounds.cpp | 26 +++++++++++++------------- stepmania/src/RageSounds.h | 10 +++++----- stepmania/src/StepMania.cpp | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/stepmania/src/RageSounds.cpp b/stepmania/src/RageSounds.cpp index 2ff47cc177..12799d2566 100644 --- a/stepmania/src/RageSounds.cpp +++ b/stepmania/src/RageSounds.cpp @@ -11,7 +11,7 @@ #include "RageDisplay.h" #include "AnnouncerManager.h" -RageSounds *SOUND = NULL; +GameSoundManager *SOUND = NULL; /* * When playing music, automatically search for an SM file for timing data. If one is @@ -299,7 +299,7 @@ int MusicThread_start( void *p ) return 0; } -RageSounds::RageSounds() +GameSoundManager::GameSoundManager() { /* Init RageSoundMan first: */ ASSERT( SOUNDMAN ); @@ -309,7 +309,7 @@ RageSounds::RageSounds() g_SoundsToPlayOnceFromAnnouncer.reserve( 16 ); g_MusicsToPlay.reserve( 16 ); - g_Mutex = new RageMutex("RageSounds"); + g_Mutex = new RageMutex("GameSoundManager"); g_Playing = new MusicPlaying( new RageSound ); g_UpdatingTimer = false; @@ -322,7 +322,7 @@ RageSounds::RageSounds() } } -RageSounds::~RageSounds() +GameSoundManager::~GameSoundManager() { if( g_ThreadedMusicStart ) { @@ -351,7 +351,7 @@ RageSounds::~RageSounds() delete pMusic; } -float RageSounds::GetFrameTimingAdjustment( float fDeltaTime ) +float GameSoundManager::GetFrameTimingAdjustment( float fDeltaTime ) { /* * We get one update per frame, and we're updated early, almost immediately after vsync, @@ -386,7 +386,7 @@ float RageSounds::GetFrameTimingAdjustment( float fDeltaTime ) return min( -fExtraDelay, 0 ); } -void RageSounds::Update( float fDeltaTime ) +void GameSoundManager::Update( float fDeltaTime ) { LockMut( *g_Mutex ); @@ -450,14 +450,14 @@ void RageSounds::Update( float fDeltaTime ) } -CString RageSounds::GetMusicPath() const +CString GameSoundManager::GetMusicPath() const { LockMut( *g_Mutex ); return g_Playing->m_Music->GetLoadedFilePath(); } /* If g_ThreadedMusicStart, this function should not touch the disk at all. */ -void RageSounds::PlayMusic( const CString &file, const CString &timing_file, bool force_loop, float start_sec, float length_sec, float fade_len, bool align_beat ) +void GameSoundManager::PlayMusic( const CString &file, const CString &timing_file, bool force_loop, float start_sec, float length_sec, float fade_len, bool align_beat ) { // LOG->Trace("play '%s' (current '%s')", file.c_str(), g_Playing->m_Music->GetLoadedFilePath().c_str()); @@ -483,13 +483,13 @@ void RageSounds::PlayMusic( const CString &file, const CString &timing_file, boo StartQueuedSounds(); } -void RageSounds::HandleSongTimer( bool on ) +void GameSoundManager::HandleSongTimer( bool on ) { LockMut( *g_Mutex ); g_UpdatingTimer = on; } -void RageSounds::PlayOnce( CString sPath ) +void GameSoundManager::PlayOnce( CString sPath ) { /* Add the sound to the g_SoundsToPlayOnce queue. */ CString *p = new CString( sPath ); @@ -500,7 +500,7 @@ void RageSounds::PlayOnce( CString sPath ) StartQueuedSounds(); } -void RageSounds::PlayOnceFromDir( CString PlayOnceFromDir ) +void GameSoundManager::PlayOnceFromDir( CString PlayOnceFromDir ) { /* Add the path to the g_SoundsToPlayOnceFromDir queue. */ CString *p = new CString( PlayOnceFromDir ); @@ -511,7 +511,7 @@ void RageSounds::PlayOnceFromDir( CString PlayOnceFromDir ) StartQueuedSounds(); } -void RageSounds::PlayOnceFromAnnouncer( CString sFolderName ) +void GameSoundManager::PlayOnceFromAnnouncer( CString sFolderName ) { /* Add the path to the g_SoundsToPlayOnceFromDir queue. */ CString *p = new CString( sFolderName ); @@ -522,7 +522,7 @@ void RageSounds::PlayOnceFromAnnouncer( CString sFolderName ) StartQueuedSounds(); } -float RageSounds::GetPlayLatency() const +float GameSoundManager::GetPlayLatency() const { return SOUNDMAN->GetPlayLatency(); } diff --git a/stepmania/src/RageSounds.h b/stepmania/src/RageSounds.h index b34660f963..2db9e9ce50 100644 --- a/stepmania/src/RageSounds.h +++ b/stepmania/src/RageSounds.h @@ -1,15 +1,15 @@ -/* RageSounds - High-level sound utilities. */ +/* GameSoundManager - High-level sound utilities. */ #ifndef RAGE_SOUNDS_H #define RAGE_SOUNDS_H class TimingData; class RageSound; -class RageSounds +class GameSoundManager { public: - RageSounds(); - ~RageSounds(); + GameSoundManager(); + ~GameSoundManager(); void Update( float fDeltaTime ); void PlayMusic( const CString &file, bool force_loop = false, float start_sec = 0, float length_sec = -1, float fade_len = 0, bool align_beat = true ) { PlayMusic( file, "", force_loop, start_sec, length_sec, fade_len, align_beat ); } @@ -26,7 +26,7 @@ public: float GetFrameTimingAdjustment( float fDeltaTime ); }; -extern RageSounds *SOUND; +extern GameSoundManager *SOUND; #endif /* diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 0002bd1b6c..7884030178 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1015,7 +1015,7 @@ int main(int argc, char* argv[]) SOUNDMAN = new RageSoundManager; SOUNDMAN->Init( PREFSMAN->m_sSoundDrivers ); SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); - SOUND = new RageSounds; + SOUND = new GameSoundManager; BOOKKEEPER = new Bookkeeper; LIGHTSMAN = new LightsManager(PREFSMAN->m_sLightsDriver); INPUTFILTER = new InputFilter;