CClientSound* CClientSoundManager::PlaySound3D ( void* pMemory, unsigned int uiLength, const CVector& vecPosition, bool bLoop ) { CClientSound* pSound = new CClientSound ( m_pClientManager, INVALID_ELEMENT_ID ); if ( pSound->Play3D ( pMemory, uiLength, bLoop ) ) { pSound->SetPosition ( vecPosition ); 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; }