Example #1
0
void RageSound::PlayCopy(bool is_action, const RageSoundParams *pParams) const
{
	if(is_action && PREFSMAN->m_MuteActions)
	{
		return;
	}
	RageSound *pSound = new RageSound( *this );

	if( pParams )
		pSound->SetParams( *pParams );

	pSound->StartPlaying();
	pSound->DeleteSelfWhenFinishedPlaying();
}
Example #2
0
RageSound *RageSoundManager::PlayCopyOfSound( RageSound &snd, const RageSoundParams *params )
{
	RageSound *pSound = new RageSound(snd);
	DeleteSoundWhenFinished( pSound );

	if( params )
		pSound->SetParams( *params );

	// Move to the start position.
	pSound->SetPositionSeconds( pSound->GetParams().m_StartSecond );

	pSound->StartPlaying();

	return pSound;
}