Get rid of inline function; doesn't need to be. Reduce dependencies.
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
#include "RageSound.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
|
|
||||||
@@ -29,6 +30,18 @@ RandomSample::~RandomSample()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool RandomSample::Load( CString sFilePath, int iMaxToLoad )
|
||||||
|
{
|
||||||
|
CString sDir, sFName, sExt;
|
||||||
|
splitrelpath( sFilePath, sDir, sFName, sExt );
|
||||||
|
|
||||||
|
sExt.MakeLower();
|
||||||
|
|
||||||
|
if( sExt == "" ) return LoadSoundDir( sFilePath, iMaxToLoad );
|
||||||
|
else return LoadSound( sFilePath );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool RandomSample::LoadSoundDir( CString sDir, int iMaxToLoad )
|
bool RandomSample::LoadSoundDir( CString sDir, int iMaxToLoad )
|
||||||
{
|
{
|
||||||
if( sDir == "" )
|
if( sDir == "" )
|
||||||
|
|||||||
@@ -11,26 +11,15 @@
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "RageSound.h"
|
class RageSound;
|
||||||
#include "RageUtil.h"
|
|
||||||
|
|
||||||
class RandomSample
|
class RandomSample
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RandomSample();
|
RandomSample();
|
||||||
virtual ~RandomSample();
|
~RandomSample();
|
||||||
|
|
||||||
virtual bool Load( CString sFilePath, int iMaxToLoad = 1000 /*load all*/ )
|
|
||||||
{
|
|
||||||
CString sDir, sFName, sExt;
|
|
||||||
splitrelpath( sFilePath, sDir, sFName, sExt );
|
|
||||||
|
|
||||||
sExt.MakeLower();
|
|
||||||
|
|
||||||
if( sExt == "" ) return LoadSoundDir( sFilePath, iMaxToLoad );
|
|
||||||
else return LoadSound( sFilePath );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
bool Load( CString sFilePath, int iMaxToLoad = 1000 /*load all*/ );
|
||||||
void PlayRandom();
|
void PlayRandom();
|
||||||
void Stop();
|
void Stop();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user