Files
itgmania212121/stepmania/src/RandomSample.h
T

38 lines
788 B
C++
Raw Normal View History

#ifndef RANDOMSAMPLE_H
#define RANDOMSAMPLE_H
2002-03-10 10:30:45 +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.
Chris Danford
2002-03-10 10:30:45 +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
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:
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;
};
#endif