Leaked source code of windows server 2003
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.

88 lines
3.7 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dvdptransport.h
  6. * Content: Definition of base class for Transport --> DirectXVoice
  7. *
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 07/06/99 rodtoll Created It
  12. * 07/29/99 rodtoll Added static members to load default settings
  13. * 08/25/99 rodtoll General Cleanup/Modifications to support new
  14. * ompression sub-system.
  15. * Added default parameter reads from the registry
  16. * 08/30/99 rodtoll Distinguish between primary buffer format and
  17. * playback format.
  18. * 09/14/99 rodtoll Updated parameters to Init
  19. * 10/07/99 rodtoll Updated to work in Unicode
  20. * 10/27/99 pnewson Fix: Bug #113935 - Saved AGC values should be device specific
  21. * 01/10/00 pnewson AGC and VA tuning
  22. * 03/03/2000 rodtoll Updated to handle alternative gamevoice build.
  23. * 04/07/2000 rodtoll Updated for new DP <--> DPV interface
  24. * 07/12/2000 rodtoll Bug #31468 - Add diagnostic spew to logfile to show what is failing the HW Wizard
  25. * 04/06/2001 kareemc Added Voice Defense
  26. *
  27. ***************************************************************************/
  28. #ifndef __DVENGINE_H
  29. #define __DVENGINE_H
  30. #include "dpvcp.h"
  31. // CDirectVoiceEngine
  32. //
  33. // This class is the base interface for DirectVoiceClientEngine and
  34. // DirectVoiceServerEngine. This interface is used by DirectPlay/
  35. // DirectNet to inform the DirectXVoice engine of new events.
  36. //
  37. // Hooks are placed into DirectPlay that call these functions.
  38. //
  39. class CDirectVoiceEngine
  40. {
  41. public:
  42. public: // Incoming messages
  43. virtual BOOL ReceiveSpeechMessage( DVID dvidSource, LPVOID lpMessage, DWORD dwSize ) = 0;
  44. public: // Session Management
  45. virtual HRESULT StartTransportSession() = 0;
  46. virtual HRESULT StopTransportSession() = 0;
  47. public: // Player information
  48. virtual HRESULT AddPlayer( DVID dvID ) = 0;
  49. virtual HRESULT RemovePlayer( DVID dvID ) = 0;
  50. public: // Used by local voice server to hook player messages to send
  51. // to the remote voice server
  52. virtual HRESULT Initialize( CDirectVoiceTransport *lpTransport, LPDVMESSAGEHANDLER lpdvHandler, LPVOID lpUserContext, LPDWORD lpdwMessages, DWORD dwNumElements ) = 0;
  53. virtual HRESULT CreateGroup( DVID dvID ) = 0;
  54. virtual HRESULT DeleteGroup( DVID dvID ) = 0;
  55. virtual HRESULT AddPlayerToGroup( DVID dvidGroup, DVID dvidPlayer ) = 0;
  56. virtual HRESULT RemovePlayerFromGroup( DVID dvidGroup, DVID dvidPlayer ) = 0;
  57. virtual HRESULT MigrateHost( DVID dvidNewHost, LPDIRECTPLAYVOICESERVER lpdvServer ) = 0;
  58. virtual HRESULT SendComplete( PDVEVENTMSG_SENDCOMPLETE pSendComplete ) = 0;
  59. public: // Compression Information Storage
  60. static HRESULT Startup( const WCHAR *szRegistryPath );
  61. static HRESULT Shutdown();
  62. static DNCRITICAL_SECTION s_csSTLLock; // Lock serializing access to the STL
  63. public: // packet validation
  64. static BOOL ValidateSpeechPacketSize( const DVFULLCOMPRESSIONINFO* lpdvfCompressionInfo, DWORD dwSize );
  65. protected:
  66. static DWORD s_dwDefaultBufferAggressiveness; // Default system buffer aggresiveness
  67. static DWORD s_dwDefaultBufferQuality; // Default system buffer quality
  68. static DWORD s_dwDefaultSensitivity; // Default system sensitivity
  69. static LPWAVEFORMATEX s_lpwfxPrimaryFormat; // Primary buffer format
  70. static LPWAVEFORMATEX s_lpwfxPlaybackFormat; // Playback format
  71. static LPWAVEFORMATEX s_lpwfxMixerFormat; // Format for the mixer
  72. static BOOL s_fASO; // Should ASO be used?
  73. static WCHAR s_szRegistryPath[_MAX_PATH]; // Registry path
  74. static BOOL s_fDumpDiagnostics; // Should we dump diagnostic info during wizard runs?
  75. };
  76. #endif