From 97d088db502f3bfaa0dceb97306740fb5fee0c40 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 15 Jan 2004 02:56:04 +0000 Subject: [PATCH] remove RageSoundManager::PlayOnceFromDir (in SOUNDS now) --- stepmania/src/RageSoundManager.cpp | 21 --------------------- stepmania/src/RageSoundManager.h | 1 - 2 files changed, 22 deletions(-) diff --git a/stepmania/src/RageSoundManager.cpp b/stepmania/src/RageSoundManager.cpp index a5fa4bb314..cf0b9c0c8a 100644 --- a/stepmania/src/RageSoundManager.cpp +++ b/stepmania/src/RageSoundManager.cpp @@ -149,27 +149,6 @@ void RageSoundManager::PlayOnce( CString sPath ) snd->Play(); } -void RageSoundManager::PlayOnceFromDir( CString sDir ) -{ - if( sDir == "" ) - return; - - // make sure there's a slash at the end of this path - if( sDir.Right(1) != "/" ) - sDir += "/"; - - CStringArray arraySoundFiles; - GetDirListing( sDir + "*.mp3", arraySoundFiles ); - GetDirListing( sDir + "*.wav", arraySoundFiles ); - GetDirListing( sDir + "*.ogg", arraySoundFiles ); - - if( arraySoundFiles.empty() ) - return; - - int index = rand() % arraySoundFiles.size(); - SOUNDMAN->PlayOnce( sDir + arraySoundFiles[index] ); -} - /* Standalone helpers: */ void RageSoundManager::SetPrefs(float MixVol) diff --git a/stepmania/src/RageSoundManager.h b/stepmania/src/RageSoundManager.h index 01eca6299b..e192cf7632 100644 --- a/stepmania/src/RageSoundManager.h +++ b/stepmania/src/RageSoundManager.h @@ -42,7 +42,6 @@ public: const set &GetPlayingSounds() const { return playing_sounds; } void PlayOnce( CString sPath ); - static void PlayOnceFromDir( CString sDir ); RageSound *PlaySound(RageSound &snd); void StopPlayingSound(RageSound &snd);