CClientSound* CClientSoundManager::PlaySound2D ( void* pMemory, unsigned int uiLength, bool bLoop ) { CClientSound* pSound = new CClientSound ( m_pClientManager, INVALID_ELEMENT_ID ); if ( pSound->Play ( pMemory, uiLength, bLoop ) ) return pSound; delete pSound; return NULL; }
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; }