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(); }
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; }