drop LoadAndPlayIfNotAlready
This commit is contained in:
@@ -756,25 +756,6 @@ void RageSound::SetPlaybackRate( float NewSpeed )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is used to start music. It probably belongs in RageSoundManager. */
|
|
||||||
void RageSound::LoadAndPlayIfNotAlready( CString sSoundFilePath )
|
|
||||||
{
|
|
||||||
LockMut(SOUNDMAN->lock);
|
|
||||||
if( GetLoadedFilePath() == sSoundFilePath && IsPlaying() )
|
|
||||||
return; // do nothing
|
|
||||||
|
|
||||||
Load( sSoundFilePath );
|
|
||||||
if(IsPlaying())
|
|
||||||
StopPlaying();
|
|
||||||
|
|
||||||
/* Use defaults: the beginning, the whole file. */
|
|
||||||
SetStartSeconds();
|
|
||||||
SetLengthSeconds();
|
|
||||||
SetPositionSamples();
|
|
||||||
SetStopMode(M_LOOP);
|
|
||||||
StartPlaying();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CircBuf::reserve(unsigned n)
|
void CircBuf::reserve(unsigned n)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ public:
|
|||||||
* they can be ignored most of the time, so we continue to work if a file
|
* they can be ignored most of the time, so we continue to work if a file
|
||||||
* is broken or missing.) */
|
* is broken or missing.) */
|
||||||
bool Load(CString fn, bool cache = true);
|
bool Load(CString fn, bool cache = true);
|
||||||
|
|
||||||
void LoadAndPlayIfNotAlready( CString sSoundFilePath );
|
|
||||||
void Unload();
|
void Unload();
|
||||||
|
|
||||||
void SetStopMode(StopMode_t m) { StopMode = m; }
|
void SetStopMode(StopMode_t m) { StopMode = m; }
|
||||||
|
|||||||
Reference in New Issue
Block a user