📄 dvoice.h
字号:
/*==========================================================================;
*
* Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
*
* File: dpvoice.h
* Content: DirectPlayVoice include file
***************************************************************************/
#ifndef __DVOICE__
#define __DVOICE__
#include <ole2.h> // for DECLARE_INTERFACE and HRESULT
#include <mmsystem.h>
#include <mmreg.h>
#include <msacm.h>
#include "dsound.h"
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************************
*
* DirectPlayVoice CLSIDs
*
****************************************************************************/
// {B9F3EB85-B781-4ac1-8D90-93A05EE37D7D}
DEFINE_GUID(CLSID_DirectPlayVoiceClient,
0xb9f3eb85, 0xb781, 0x4ac1, 0x8d, 0x90, 0x93, 0xa0, 0x5e, 0xe3, 0x7d, 0x7d);
// {D3F5B8E6-9B78-4a4c-94EA-CA2397B663D3}
DEFINE_GUID(CLSID_DirectPlayVoiceServer,
0xd3f5b8e6, 0x9b78, 0x4a4c, 0x94, 0xea, 0xca, 0x23, 0x97, 0xb6, 0x63, 0xd3);
// {0F0F094B-B01C-4091-A14D-DD0CD807711A}
DEFINE_GUID(CLSID_DirectPlayVoiceTest,
0xf0f094b, 0xb01c, 0x4091, 0xa1, 0x4d, 0xdd, 0xc, 0xd8, 0x7, 0x71, 0x1a);
/****************************************************************************
*
* DirectPlayVoice Interface IIDs
*
****************************************************************************/
// {1DFDC8EA-BCF7-41d6-B295-AB64B3B23306}
DEFINE_GUID(IID_IDirectPlayVoiceClient,
0x1dfdc8ea, 0xbcf7, 0x41d6, 0xb2, 0x95, 0xab, 0x64, 0xb3, 0xb2, 0x33, 0x6);
// {FAA1C173-0468-43b6-8A2A-EA8A4F2076C9}
DEFINE_GUID(IID_IDirectPlayVoiceServer,
0xfaa1c173, 0x468, 0x43b6, 0x8a, 0x2a, 0xea, 0x8a, 0x4f, 0x20, 0x76, 0xc9);
// {D26AF734-208B-41da-8224-E0CE79810BE1}
DEFINE_GUID(IID_IDirectPlayVoiceTest,
0xd26af734, 0x208b, 0x41da, 0x82, 0x24, 0xe0, 0xce, 0x79, 0x81, 0xb, 0xe1);
/****************************************************************************
*
* DirectPlayVoice Compression Type GUIDs
*
****************************************************************************/
// MS-ADPCM 32.8 kbit/s
//
// {699B52C1-A885-46a8-A308-97172419ADC7}
DEFINE_GUID(DPVCTGUID_ADPCM,
0x699b52c1, 0xa885, 0x46a8, 0xa3, 0x8, 0x97, 0x17, 0x24, 0x19, 0xad, 0xc7);
// Microsoft GSM 6.10 13 kbit/s
//
// {24768C60-5A0D-11d3-9BE4-525400D985E7}
DEFINE_GUID(DPVCTGUID_GSM,
0x24768c60, 0x5a0d, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
// MS-PCM 64 kbit/s
//
// {8DE12FD4-7CB3-48ce-A7E8-9C47A22E8AC5}
DEFINE_GUID(DPVCTGUID_NONE,
0x8de12fd4, 0x7cb3, 0x48ce, 0xa7, 0xe8, 0x9c, 0x47, 0xa2, 0x2e, 0x8a, 0xc5);
// Voxware SC03 3.2kbit/s
//
// {7D82A29B-2242-4f82-8F39-5D1153DF3E41}
DEFINE_GUID(DPVCTGUID_SC03,
0x7d82a29b, 0x2242, 0x4f82, 0x8f, 0x39, 0x5d, 0x11, 0x53, 0xdf, 0x3e, 0x41);
// Voxware SC06 6.4kbit/s
//
// {53DEF900-7168-4633-B47F-D143916A13C7}
DEFINE_GUID(DPVCTGUID_SC06,
0x53def900, 0x7168, 0x4633, 0xb4, 0x7f, 0xd1, 0x43, 0x91, 0x6a, 0x13, 0xc7);
// TrueSpeech(TM) 8.6 kbit/s
//
// {D7954361-5A0B-11d3-9BE4-525400D985E7}
DEFINE_GUID(DPVCTGUID_TRUESPEECH,
0xd7954361, 0x5a0b, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
// Voxware VR12 1.4kbit/s
//
// {FE44A9FE-8ED4-48bf-9D66-1B1ADFF9FF6D}
DEFINE_GUID(DPVCTGUID_VR12,
0xfe44a9fe, 0x8ed4, 0x48bf, 0x9d, 0x66, 0x1b, 0x1a, 0xdf, 0xf9, 0xff, 0x6d);
// Define the default compression type
#define DPVCTGUID_DEFAULT DPVCTGUID_SC03
/****************************************************************************
*
* DirectPlayVoice Interface Pointer definitions
*
****************************************************************************/
typedef struct IDirectPlayVoiceClient FAR *LPDIRECTPLAYVOICECLIENT, *PDIRECTPLAYVOICECLIENT;
typedef struct IDirectPlayVoiceServer FAR *LPDIRECTPLAYVOICESERVER, *PDIRECTPLAYVOICESERVER;
typedef struct IDirectPlayVoiceTest FAR *LPDIRECTPLAYVOICETEST, *PDIRECTPLAYVOICETEST;
/****************************************************************************
*
* DirectPlayVoice Callback Functions
*
****************************************************************************/
typedef HRESULT (FAR PASCAL *PDVMESSAGEHANDLER)(
PVOID pvUserContext,
DWORD dwMessageType,
LPVOID lpMessage
);
typedef PDVMESSAGEHANDLER LPDVMESSAGEHANDLER;
/****************************************************************************
*
* DirectPlayVoice Datatypes (Non-Structure / Non-Message)
*
****************************************************************************/
typedef DWORD DVID, *LPDVID, *PDVID;
/****************************************************************************
*
* DirectPlayVoice Message Types
*
****************************************************************************/
#define DVMSGID_BASE 0x0000
#define DVMSGID_MINBASE (DVMSGID_CREATEVOICEPLAYER)
#define DVMSGID_CREATEVOICEPLAYER (DVMSGID_BASE+0x0001)
#define DVMSGID_DELETEVOICEPLAYER (DVMSGID_BASE+0x0002)
#define DVMSGID_SESSIONLOST (DVMSGID_BASE+0x0003)
#define DVMSGID_PLAYERVOICESTART (DVMSGID_BASE+0x0004)
#define DVMSGID_PLAYERVOICESTOP (DVMSGID_BASE+0x0005)
#define DVMSGID_RECORDSTART (DVMSGID_BASE+0x0006)
#define DVMSGID_RECORDSTOP (DVMSGID_BASE+0x0007)
#define DVMSGID_CONNECTRESULT (DVMSGID_BASE+0x0008)
#define DVMSGID_DISCONNECTRESULT (DVMSGID_BASE+0x0009)
#define DVMSGID_INPUTLEVEL (DVMSGID_BASE+0x000A)
#define DVMSGID_OUTPUTLEVEL (DVMSGID_BASE+0x000B)
#define DVMSGID_HOSTMIGRATED (DVMSGID_BASE+0x000C)
#define DVMSGID_SETTARGETS (DVMSGID_BASE+0x000D)
#define DVMSGID_PLAYEROUTPUTLEVEL (DVMSGID_BASE+0x000E)
#define DVMSGID_LOSTFOCUS (DVMSGID_BASE+0x0010)
#define DVMSGID_GAINFOCUS (DVMSGID_BASE+0x0011)
#define DVMSGID_LOCALHOSTSETUP (DVMSGID_BASE+0x0012)
#define DVMSGID_MAXBASE (DVMSGID_LOCALHOSTSETUP)
/****************************************************************************
*
* DirectPlayVoice Constants
*
****************************************************************************/
//
// Buffer Aggresiveness Value Ranges
//
#define DVBUFFERAGGRESSIVENESS_MIN 0x00000001
#define DVBUFFERAGGRESSIVENESS_MAX 0x00000064
#define DVBUFFERAGGRESSIVENESS_DEFAULT 0x00000000
//
// Buffer Quality Value Ranges
//
#define DVBUFFERQUALITY_MIN 0x00000001
#define DVBUFFERQUALITY_MAX 0x00000064
#define DVBUFFERQUALITY_DEFAULT 0x00000000
#define DVID_SYS 0
//
// Used to identify the session host in client/server
//
#define DVID_SERVERPLAYER 1
//
// Used to target all players
//
#define DVID_ALLPLAYERS 0
//
// Used to identify the main buffer
//
#define DVID_REMAINING 0xFFFFFFFF
//
// Input level range
//
#define DVINPUTLEVEL_MIN 0x00000000
#define DVINPUTLEVEL_MAX 0x00000063 // 99 decimal
#define DVNOTIFYPERIOD_MINPERIOD 20
#define DVPLAYBACKVOLUME_DEFAULT DSBVOLUME_MAX
#define DVRECORDVOLUME_LAST 0x00000001
//
// Use the default value
//
#define DVTHRESHOLD_DEFAULT 0xFFFFFFFF
//
// Threshold Ranges
//
#define DVTHRESHOLD_MIN 0x00000000
#define DVTHRESHOLD_MAX 0x00000063 // 99 decimal
//
// Threshold field is not used
//
#define DVTHRESHOLD_UNUSED 0xFFFFFFFE
//
// Session Types
//
#define DVSESSIONTYPE_PEER 0x00000001
#define DVSESSIONTYPE_MIXING 0x00000002
#define DVSESSIONTYPE_FORWARDING 0x00000003
#define DVSESSIONTYPE_ECHO 0x00000004
/****************************************************************************
*
* DirectPlayVoice Flags
*
****************************************************************************/
//
// Enable automatic adjustment of the recording volume
//
#define DVCLIENTCONFIG_AUTORECORDVOLUME 0x00000008
//
// Enable automatic voice activation
//
#define DVCLIENTCONFIG_AUTOVOICEACTIVATED 0x00000020
//
// Enable echo suppression
//
#define DVCLIENTCONFIG_ECHOSUPPRESSION 0x08000000
//
// Voice Activation manual mode
//
#define DVCLIENTCONFIG_MANUALVOICEACTIVATED 0x00000004
//
// Only playback voices that have buffers created for them
//
#define DVCLIENTCONFIG_MUTEGLOBAL 0x00000010
//
// Mute the playback
//
#define DVCLIENTCONFIG_PLAYBACKMUTE 0x00000002
//
// Mute the recording
//
#define DVCLIENTCONFIG_RECORDMUTE 0x00000001
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -