Etterna 0.74.4
Loading...
Searching...
No Matches
RandomSample.h
1/* RandomSample - Holds multiple sounds samples and can play a random sound
2 * easily. */
3
4#ifndef RANDOM_SAMPLE_H
5#define RANDOM_SAMPLE_H
6
7class RageSound;
8
10{
11 public:
13 virtual ~RandomSample();
14
15 bool Load(const std::string& sFilePath, int iMaxToLoad = 1000 /*load all*/);
16 void UnloadAll();
17 void PlayRandom();
18 void PlayCopyOfRandom();
19 void Stop();
20
21 private:
22 bool LoadSoundDir(std::string sDir, int iMaxToLoad);
23 bool LoadSound(const std::string& sSoundFilePath);
24 int GetNextToPlay();
25
26 std::vector<RageSound*> m_pSamples;
27 int m_iIndexLastPlayed;
28};
29
30#endif
Definition RageSound.h:130
Definition RandomSample.h:10