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.

59 lines
1.5 KiB

  1. //===== Copyright � 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef MM_VOICE_H
  7. #define MM_VOICE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "mm_framework.h"
  12. #include "utlvector.h"
  13. class CMatchVoice : public IMatchVoice
  14. {
  15. // Methods of IMatchVoice
  16. public:
  17. // Whether remote player talking can be visualized / audible
  18. virtual bool CanPlaybackTalker( XUID xuidTalker );
  19. // Whether we are explicitly muting a remote player
  20. virtual bool IsTalkerMuted( XUID xuidTalker );
  21. // Whether we are muting any player on the player's machine
  22. virtual bool IsMachineMuted( XUID xuidPlayer );
  23. // Whether voice recording mode is currently active
  24. virtual bool IsVoiceRecording();
  25. // Enable or disable voice recording
  26. virtual void SetVoiceRecording( bool bRecordingEnabled );
  27. // Enable or disable voice mute for a given talker
  28. virtual void MuteTalker( XUID xuidTalker, bool bMute );
  29. protected:
  30. // Remap XUID of a player to a valid LIVE-enabled XUID
  31. XUID RemapTalkerXuid( XUID xuidTalker );
  32. // Check player-player voice privileges for machine blocking purposes
  33. bool IsTalkerMutedWithPrivileges( int iCtrlr, XUID xuidTalker );
  34. // Check if player machine is muting any of local players
  35. bool IsMachineMutingLocalTalkers( XUID xuidPlayer );
  36. public:
  37. CMatchVoice();
  38. ~CMatchVoice();
  39. protected:
  40. CUtlVector< XUID > m_arrMutedTalkers;
  41. };
  42. // Match events subscription singleton
  43. extern CMatchVoice *g_pMatchVoice;
  44. #endif // MM_VOICE_H