remove RageSoundManager::PlaySound
This commit is contained in:
@@ -412,10 +412,19 @@ void RageSound::Play( const RageSoundParams *pParams )
|
||||
if( m_pSource == NULL )
|
||||
{
|
||||
LOG->Warn( "RageSound::Play: sound not loaded" );
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
SOUNDMAN->PlaySound( *this, pParams );
|
||||
if( IsPlaying() )
|
||||
{
|
||||
SOUNDMAN->PlayCopyOfSound( *this, pParams );
|
||||
return;
|
||||
}
|
||||
|
||||
if( pParams )
|
||||
SetParams( *pParams );
|
||||
|
||||
StartPlaying();
|
||||
}
|
||||
|
||||
void RageSound::Stop()
|
||||
|
||||
@@ -144,20 +144,6 @@ int RageSoundManager::GetDriverSampleRate() const
|
||||
return m_pDriver->GetSampleRate();
|
||||
}
|
||||
|
||||
/* The return value of PlaySound and PlayCopyOfSound is only valid in the main
|
||||
* thread, until the next call to Update(). After that, it may be deleted. */
|
||||
RageSound *RageSoundManager::PlaySound( RageSound &snd, const RageSoundParams *params )
|
||||
{
|
||||
if( snd.IsPlaying() )
|
||||
return PlayCopyOfSound( snd, params );
|
||||
|
||||
if( params )
|
||||
snd.SetParams( *params );
|
||||
|
||||
snd.StartPlaying();
|
||||
return &snd;
|
||||
}
|
||||
|
||||
RageSound *RageSoundManager::PlayCopyOfSound( RageSound &snd, const RageSoundParams *pParams )
|
||||
{
|
||||
RageSound *pSound = new RageSound( snd );
|
||||
|
||||
@@ -47,7 +47,6 @@ public:
|
||||
|
||||
void PlayOnce( RString sPath );
|
||||
|
||||
RageSound *PlaySound( RageSound &snd, const RageSoundParams *params = NULL );
|
||||
RageSound *PlayCopyOfSound( RageSound &snd, const RageSoundParams *params = NULL );
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user