Etterna
0.74.4
Loading...
Searching...
No Matches
src
Etterna
Models
Misc
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
7
class
RageSound
;
8
9
class
RandomSample
10
{
11
public
:
12
RandomSample
();
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
RageSound
Definition
RageSound.h:130
RandomSample
Definition
RandomSample.h:10
Generated by
1.9.8