CClientSound* CClientSoundManager::PlaySound2D ( const SString& strSound, bool bIsURL, bool bLoop ) { CClientSound* pSound = new CClientSound ( m_pClientManager, INVALID_ELEMENT_ID ); if ( bIsURL ) { pSound->PlayStream ( strSound, bLoop ); return pSound; } else if ( pSound->Play ( strSound, bLoop ) ) return pSound; delete pSound; return NULL; }
CClientSound* CClientSoundManager::PlaySound3D ( const SString& strSound, bool bIsURL, const CVector& vecPosition, bool bLoop ) { CClientSound* pSound = new CClientSound ( m_pClientManager, INVALID_ELEMENT_ID ); if ( bIsURL ) { pSound->PlayStream ( strSound, bLoop, true ); pSound->SetPosition ( vecPosition ); return pSound; } else if ( pSound->Play3D ( strSound, bLoop ) ) { pSound->SetPosition ( vecPosition ); return pSound; } delete pSound; return NULL; }