Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

  1. #ifndef SND_STUBS_H
  2. #define SND_STUBS_H
  3. #include "engine/ienginevoice.h"
  4. class CEngineVoiceStub : public IEngineVoice
  5. {
  6. public:
  7. virtual bool IsHeadsetPresent( int iController ) { return false; }
  8. virtual bool IsLocalPlayerTalking( int iController ) { return false; }
  9. virtual void AddPlayerToVoiceList( XUID xPlayer, int iController, uint64 uiFlags ) {}
  10. virtual void RemovePlayerFromVoiceList( XUID xPlayer, int iController ) {}
  11. virtual void GetRemoteTalkers( int *pNumTalkers, XUID *pRemoteTalkers )
  12. {
  13. if ( pNumTalkers )
  14. *pNumTalkers = 0;
  15. }
  16. virtual bool VoiceUpdateData( int iController ) { return false; }
  17. virtual void GetVoiceData( int iController, const byte **ppvVoiceDataBuffer, unsigned int *pnumVoiceDataBytes )
  18. {
  19. if ( ppvVoiceDataBuffer )
  20. *ppvVoiceDataBuffer = NULL;
  21. if ( pnumVoiceDataBytes )
  22. *pnumVoiceDataBytes = NULL;
  23. }
  24. virtual void VoiceResetLocalData( int iController ) {}
  25. virtual void SetPlaybackPriority( XUID remoteTalker, int iController, int iAllowPlayback ) {}
  26. virtual void PlayIncomingVoiceData( XUID xuid, const byte *pbData, unsigned int dwDataSize, const bool *bAudiblePlayers = NULL ) {}
  27. virtual void RemoveAllTalkers() {}
  28. };
  29. CEngineVoiceStub *Audio_GetEngineVoiceStub();
  30. IEngineVoice *Audio_GetEngineVoiceSteam();
  31. #endif