remove RageSoundManager::PlayOnceFromDir (in SOUNDS now)
This commit is contained in:
@@ -149,27 +149,6 @@ void RageSoundManager::PlayOnce( CString sPath )
|
|||||||
snd->Play();
|
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: */
|
/* Standalone helpers: */
|
||||||
|
|
||||||
void RageSoundManager::SetPrefs(float MixVol)
|
void RageSoundManager::SetPrefs(float MixVol)
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ public:
|
|||||||
const set<RageSound *> &GetPlayingSounds() const { return playing_sounds; }
|
const set<RageSound *> &GetPlayingSounds() const { return playing_sounds; }
|
||||||
|
|
||||||
void PlayOnce( CString sPath );
|
void PlayOnce( CString sPath );
|
||||||
static void PlayOnceFromDir( CString sDir );
|
|
||||||
|
|
||||||
RageSound *PlaySound(RageSound &snd);
|
RageSound *PlaySound(RageSound &snd);
|
||||||
void StopPlayingSound(RageSound &snd);
|
void StopPlayingSound(RageSound &snd);
|
||||||
|
|||||||
Reference in New Issue
Block a user