netvoice.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:2k
源码类别:

游戏

开发平台:

Visual C++

  1. //-----------------------------------------------------------------------------
  2. // File: NetVoice.h
  3. //
  4. // Desc: 
  5. //
  6. // Copyright (C) Microsoft Corporation. All Rights Reserved.
  7. //-----------------------------------------------------------------------------
  8. #ifndef NETVOICE_H
  9. #define NETVOICE_H
  10. #include <windows.h>
  11. #include <dvoice.h>
  12. class CNetVoice
  13. {
  14. public:
  15.     CNetVoice( LPDVMESSAGEHANDLER pfnDirectPlayClientVoiceMessageHandler,
  16.                LPDVMESSAGEHANDLER pfnDirectPlayServerVoiceMessageHandler );
  17.     virtual ~CNetVoice();
  18.     HRESULT Init( HWND hDlg, BOOL bCreateSession, BOOL bConnectToSession, 
  19.                   LPUNKNOWN pDirectPlay, DWORD dwSessionType, GUID* pGuidCT, 
  20.                   DVCLIENTCONFIG* pdvClientConfig, LPDIRECTSOUND lpds = NULL );
  21.     HRESULT Free();
  22.     HRESULT HostMigrate( LPDIRECTPLAYVOICESERVER pdvServerInterface );
  23.     BOOL IsHalfDuplex() { return m_bHalfDuplex; }
  24.     HRESULT ChangeVoiceClientSettings( DVCLIENTCONFIG* pdvClientConfig );
  25.     LPDIRECTPLAYVOICECLIENT GetVoiceClient() { return m_pVoiceClient; }
  26.     LPDIRECTPLAYVOICESERVER GetVoiceServer() { return m_pVoiceServer; }
  27. protected:
  28.     LPDIRECTPLAYVOICECLIENT m_pVoiceClient;
  29.     LPDIRECTPLAYVOICESERVER m_pVoiceServer;                                                                             
  30.     LPDVMESSAGEHANDLER m_pfnDirectPlayClientVoiceMessageHandler;
  31.     LPDVMESSAGEHANDLER m_pfnDirectPlayServerVoiceMessageHandler;
  32.     HRESULT VoiceSessionCreate( LPUNKNOWN pDirectPlay, DWORD dwSessionType, GUID* pGuidCT );
  33.     HRESULT VoiceSessionTestAudioSetup( HWND hDlg );
  34.     HRESULT VoiceSessionConnect( HWND hDlg, LPUNKNOWN pDirectPlay, 
  35.                                  DVCLIENTCONFIG* pdvClientConfig, LPDIRECTSOUND lpds = NULL );
  36.     HRESULT VoiceSessionDisconnect();
  37.     HRESULT VoiceSessionDestroy();
  38.     BOOL m_bHalfDuplex;
  39. };
  40. #endif // NETVOICE_H