2002-11-16 08:07:38 +00:00
|
|
|
#ifndef RANDOMSAMPLE_H
|
|
|
|
|
#define RANDOMSAMPLE_H
|
2002-03-10 10:30:45 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
2002-07-31 19:40:40 +00:00
|
|
|
Class: RandomSample
|
2002-03-10 10:30:45 +00:00
|
|
|
|
|
|
|
|
Desc: Holds multiple sounds samples and can play a random sound easily.
|
|
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
2002-07-31 19:40:40 +00:00
|
|
|
Chris Danford
|
2002-03-10 10:30:45 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
2003-04-11 15:55:20 +00:00
|
|
|
class RageSound;
|
2002-03-10 10:30:45 +00:00
|
|
|
|
|
|
|
|
class RandomSample
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
RandomSample();
|
2003-04-13 00:44:50 +00:00
|
|
|
virtual ~RandomSample();
|
2002-03-10 10:30:45 +00:00
|
|
|
|
2003-04-11 15:55:20 +00:00
|
|
|
bool Load( CString sFilePath, int iMaxToLoad = 1000 /*load all*/ );
|
2003-07-09 02:27:05 +00:00
|
|
|
void UnloadAll();
|
2002-03-10 10:30:45 +00:00
|
|
|
void PlayRandom();
|
|
|
|
|
void Stop();
|
|
|
|
|
|
|
|
|
|
private:
|
2003-03-16 07:38:40 +00:00
|
|
|
bool LoadSoundDir( CString sDir, int iMaxToLoad );
|
2002-03-10 10:30:45 +00:00
|
|
|
bool LoadSound( CString sSoundFilePath );
|
|
|
|
|
|
|
|
|
|
|
2003-01-03 05:56:28 +00:00
|
|
|
vector<RageSound*> m_pSamples;
|
2002-03-10 10:30:45 +00:00
|
|
|
int m_iIndexLastPlayed;
|
|
|
|
|
};
|
|
|
|
|
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|