Team Fortress 2 Source Code as on 22/4/2020
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.

42 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Engine voice interface
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IENGINEVOICE_H
  8. #define IENGINEVOICE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "basetypes.h"
  13. #define IENGINEVOICE_INTERFACE_VERSION "IEngineVoice001"
  14. abstract_class IEngineVoice
  15. {
  16. public:
  17. virtual bool IsHeadsetPresent( int iController ) = 0;
  18. virtual bool IsLocalPlayerTalking( int iController ) = 0;
  19. virtual void AddPlayerToVoiceList( XUID xPlayer, int iController ) = 0;
  20. virtual void RemovePlayerFromVoiceList( XUID xPlayer, int iController ) = 0;
  21. virtual void GetRemoteTalkers( int *pNumTalkers, XUID *pRemoteTalkers ) = 0;
  22. virtual bool VoiceUpdateData( int iController ) = 0;
  23. virtual void GetVoiceData( int iController, const byte **ppvVoiceDataBuffer, unsigned int *pnumVoiceDataBytes ) = 0;
  24. virtual void VoiceResetLocalData( int iController ) = 0;
  25. virtual void SetPlaybackPriority( XUID remoteTalker, int iController, int iAllowPlayback ) = 0;
  26. virtual void PlayIncomingVoiceData( XUID xuid, const byte *pbData, unsigned int dwDataSize, const bool *bAudiblePlayers = NULL ) = 0;
  27. virtual void RemoveAllTalkers() = 0;
  28. };
  29. #endif // IENGINEVOICE_H