/[cvs]/api/include/dvoice.h
ViewVC logotype

Contents of /api/include/dvoice.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (23 years, 5 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

1 /*==========================================================================;
2 *
3 * Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
4 *
5 * File: dpvoice.h
6 * Content: DirectPlayVoice include file
7 ***************************************************************************/
8
9 #ifndef __DVOICE__
10 #define __DVOICE__
11
12 #include <ole2.h> // for DECLARE_INTERFACE and HRESULT
13 #include <mmsystem.h>
14 #include <mmreg.h>
15 #include <msacm.h>
16 #include "dsound.h"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 /****************************************************************************
23 *
24 * DirectPlayVoice CLSIDs
25 *
26 ****************************************************************************/
27
28
29 // {B9F3EB85-B781-4ac1-8D90-93A05EE37D7D}
30 DEFINE_GUID(CLSID_DirectPlayVoiceClient,
31 0xb9f3eb85, 0xb781, 0x4ac1, 0x8d, 0x90, 0x93, 0xa0, 0x5e, 0xe3, 0x7d, 0x7d);
32
33 // {D3F5B8E6-9B78-4a4c-94EA-CA2397B663D3}
34 DEFINE_GUID(CLSID_DirectPlayVoiceServer,
35 0xd3f5b8e6, 0x9b78, 0x4a4c, 0x94, 0xea, 0xca, 0x23, 0x97, 0xb6, 0x63, 0xd3);
36
37 // {0F0F094B-B01C-4091-A14D-DD0CD807711A}
38 DEFINE_GUID(CLSID_DirectPlayVoiceTest,
39 0xf0f094b, 0xb01c, 0x4091, 0xa1, 0x4d, 0xdd, 0xc, 0xd8, 0x7, 0x71, 0x1a);
40
41 /****************************************************************************
42 *
43 * DirectPlayVoice Interface IIDs
44 *
45 ****************************************************************************/
46
47
48 // {1DFDC8EA-BCF7-41d6-B295-AB64B3B23306}
49 DEFINE_GUID(IID_IDirectPlayVoiceClient,
50 0x1dfdc8ea, 0xbcf7, 0x41d6, 0xb2, 0x95, 0xab, 0x64, 0xb3, 0xb2, 0x33, 0x6);
51
52 // {FAA1C173-0468-43b6-8A2A-EA8A4F2076C9}
53 DEFINE_GUID(IID_IDirectPlayVoiceServer,
54 0xfaa1c173, 0x468, 0x43b6, 0x8a, 0x2a, 0xea, 0x8a, 0x4f, 0x20, 0x76, 0xc9);
55
56 // {D26AF734-208B-41da-8224-E0CE79810BE1}
57 DEFINE_GUID(IID_IDirectPlayVoiceTest,
58 0xd26af734, 0x208b, 0x41da, 0x82, 0x24, 0xe0, 0xce, 0x79, 0x81, 0xb, 0xe1);
59
60 /****************************************************************************
61 *
62 * DirectPlayVoice Compression Type GUIDs
63 *
64 ****************************************************************************/
65
66 // MS-ADPCM 32.8 kbit/s
67 //
68 // {699B52C1-A885-46a8-A308-97172419ADC7}
69 DEFINE_GUID(DPVCTGUID_ADPCM,
70 0x699b52c1, 0xa885, 0x46a8, 0xa3, 0x8, 0x97, 0x17, 0x24, 0x19, 0xad, 0xc7);
71
72 // Microsoft GSM 6.10 13 kbit/s
73 //
74 // {24768C60-5A0D-11d3-9BE4-525400D985E7}
75 DEFINE_GUID(DPVCTGUID_GSM,
76 0x24768c60, 0x5a0d, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
77
78 // MS-PCM 64 kbit/s
79 //
80 // {8DE12FD4-7CB3-48ce-A7E8-9C47A22E8AC5}
81 DEFINE_GUID(DPVCTGUID_NONE,
82 0x8de12fd4, 0x7cb3, 0x48ce, 0xa7, 0xe8, 0x9c, 0x47, 0xa2, 0x2e, 0x8a, 0xc5);
83
84 // Voxware SC03 3.2kbit/s
85 //
86 // {7D82A29B-2242-4f82-8F39-5D1153DF3E41}
87 DEFINE_GUID(DPVCTGUID_SC03,
88 0x7d82a29b, 0x2242, 0x4f82, 0x8f, 0x39, 0x5d, 0x11, 0x53, 0xdf, 0x3e, 0x41);
89
90 // Voxware SC06 6.4kbit/s
91 //
92 // {53DEF900-7168-4633-B47F-D143916A13C7}
93 DEFINE_GUID(DPVCTGUID_SC06,
94 0x53def900, 0x7168, 0x4633, 0xb4, 0x7f, 0xd1, 0x43, 0x91, 0x6a, 0x13, 0xc7);
95
96 // TrueSpeech(TM) 8.6 kbit/s
97 //
98 // {D7954361-5A0B-11d3-9BE4-525400D985E7}
99 DEFINE_GUID(DPVCTGUID_TRUESPEECH,
100 0xd7954361, 0x5a0b, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
101
102 // Voxware VR12 1.4kbit/s
103 //
104 // {FE44A9FE-8ED4-48bf-9D66-1B1ADFF9FF6D}
105 DEFINE_GUID(DPVCTGUID_VR12,
106 0xfe44a9fe, 0x8ed4, 0x48bf, 0x9d, 0x66, 0x1b, 0x1a, 0xdf, 0xf9, 0xff, 0x6d);
107
108 // Define the default compression type
109 #define DPVCTGUID_DEFAULT DPVCTGUID_SC03
110
111 /****************************************************************************
112 *
113 * DirectPlayVoice Interface Pointer definitions
114 *
115 ****************************************************************************/
116
117 typedef struct IDirectPlayVoiceClient FAR *LPDIRECTPLAYVOICECLIENT, *PDIRECTPLAYVOICECLIENT;
118 typedef struct IDirectPlayVoiceServer FAR *LPDIRECTPLAYVOICESERVER, *PDIRECTPLAYVOICESERVER;
119 typedef struct IDirectPlayVoiceTest FAR *LPDIRECTPLAYVOICETEST, *PDIRECTPLAYVOICETEST;
120
121 /****************************************************************************
122 *
123 * DirectPlayVoice Callback Functions
124 *
125 ****************************************************************************/
126 typedef HRESULT (FAR PASCAL *PDVMESSAGEHANDLER)(
127 PVOID pvUserContext,
128 DWORD dwMessageType,
129 LPVOID lpMessage
130 );
131
132 typedef PDVMESSAGEHANDLER LPDVMESSAGEHANDLER;
133
134 /****************************************************************************
135 *
136 * DirectPlayVoice Datatypes (Non-Structure / Non-Message)
137 *
138 ****************************************************************************/
139
140 typedef DWORD DVID, *LPDVID, *PDVID;
141
142 /****************************************************************************
143 *
144 * DirectPlayVoice Message Types
145 *
146 ****************************************************************************/
147
148 #define DVMSGID_BASE 0x0000
149
150 #define DVMSGID_MINBASE (DVMSGID_CREATEVOICEPLAYER)
151 #define DVMSGID_CREATEVOICEPLAYER (DVMSGID_BASE+0x0001)
152 #define DVMSGID_DELETEVOICEPLAYER (DVMSGID_BASE+0x0002)
153 #define DVMSGID_SESSIONLOST (DVMSGID_BASE+0x0003)
154 #define DVMSGID_PLAYERVOICESTART (DVMSGID_BASE+0x0004)
155 #define DVMSGID_PLAYERVOICESTOP (DVMSGID_BASE+0x0005)
156 #define DVMSGID_RECORDSTART (DVMSGID_BASE+0x0006)
157 #define DVMSGID_RECORDSTOP (DVMSGID_BASE+0x0007)
158 #define DVMSGID_CONNECTRESULT (DVMSGID_BASE+0x0008)
159 #define DVMSGID_DISCONNECTRESULT (DVMSGID_BASE+0x0009)
160 #define DVMSGID_INPUTLEVEL (DVMSGID_BASE+0x000A)
161 #define DVMSGID_OUTPUTLEVEL (DVMSGID_BASE+0x000B)
162 #define DVMSGID_HOSTMIGRATED (DVMSGID_BASE+0x000C)
163 #define DVMSGID_SETTARGETS (DVMSGID_BASE+0x000D)
164 #define DVMSGID_PLAYEROUTPUTLEVEL (DVMSGID_BASE+0x000E)
165 #define DVMSGID_LOSTFOCUS (DVMSGID_BASE+0x0010)
166 #define DVMSGID_GAINFOCUS (DVMSGID_BASE+0x0011)
167 #define DVMSGID_LOCALHOSTSETUP (DVMSGID_BASE+0x0012)
168 #define DVMSGID_MAXBASE (DVMSGID_LOCALHOSTSETUP)
169
170 /****************************************************************************
171 *
172 * DirectPlayVoice Constants
173 *
174 ****************************************************************************/
175
176 //
177 // Buffer Aggresiveness Value Ranges
178 //
179 #define DVBUFFERAGGRESSIVENESS_MIN 0x00000001
180 #define DVBUFFERAGGRESSIVENESS_MAX 0x00000064
181 #define DVBUFFERAGGRESSIVENESS_DEFAULT 0x00000000
182
183 //
184 // Buffer Quality Value Ranges
185 //
186 #define DVBUFFERQUALITY_MIN 0x00000001
187 #define DVBUFFERQUALITY_MAX 0x00000064
188 #define DVBUFFERQUALITY_DEFAULT 0x00000000
189
190 #define DVID_SYS 0
191
192 //
193 // Used to identify the session host in client/server
194 //
195 #define DVID_SERVERPLAYER 1
196
197 //
198 // Used to target all players
199 //
200 #define DVID_ALLPLAYERS 0
201
202 //
203 // Used to identify the main buffer
204 //
205 #define DVID_REMAINING 0xFFFFFFFF
206
207 //
208 // Input level range
209 //
210 #define DVINPUTLEVEL_MIN 0x00000000
211 #define DVINPUTLEVEL_MAX 0x00000063 // 99 decimal
212
213 #define DVNOTIFYPERIOD_MINPERIOD 20
214
215
216 #define DVPLAYBACKVOLUME_DEFAULT DSBVOLUME_MAX
217
218 #define DVRECORDVOLUME_LAST 0x00000001
219
220
221 //
222 // Use the default value
223 //
224 #define DVTHRESHOLD_DEFAULT 0xFFFFFFFF
225
226 //
227 // Threshold Ranges
228 //
229 #define DVTHRESHOLD_MIN 0x00000000
230 #define DVTHRESHOLD_MAX 0x00000063 // 99 decimal
231
232 //
233 // Threshold field is not used
234 //
235 #define DVTHRESHOLD_UNUSED 0xFFFFFFFE
236
237 //
238 // Session Types
239 //
240 #define DVSESSIONTYPE_PEER 0x00000001
241 #define DVSESSIONTYPE_MIXING 0x00000002
242 #define DVSESSIONTYPE_FORWARDING 0x00000003
243 #define DVSESSIONTYPE_ECHO 0x00000004
244
245 /****************************************************************************
246 *
247 * DirectPlayVoice Flags
248 *
249 ****************************************************************************/
250
251
252 //
253 // Enable automatic adjustment of the recording volume
254 //
255 #define DVCLIENTCONFIG_AUTORECORDVOLUME 0x00000008
256
257 //
258 // Enable automatic voice activation
259 //
260 #define DVCLIENTCONFIG_AUTOVOICEACTIVATED 0x00000020
261
262 //
263 // Enable echo suppression
264 //
265 #define DVCLIENTCONFIG_ECHOSUPPRESSION 0x08000000
266
267 //
268 // Voice Activation manual mode
269 //
270 #define DVCLIENTCONFIG_MANUALVOICEACTIVATED 0x00000004
271
272 //
273 // Only playback voices that have buffers created for them
274 //
275 #define DVCLIENTCONFIG_MUTEGLOBAL 0x00000010
276
277 //
278 // Mute the playback
279 //
280 #define DVCLIENTCONFIG_PLAYBACKMUTE 0x00000002
281
282 //
283 // Mute the recording
284 //
285 #define DVCLIENTCONFIG_RECORDMUTE 0x00000001
286
287 //
288 // Complete the operation before returning
289 //
290 #define DVFLAGS_SYNC 0x00000001
291
292 //
293 // Just check to see if wizard has been run, and if so what it's results were
294 //
295 #define DVFLAGS_QUERYONLY 0x00000002
296
297 //
298 // Shutdown the voice session without migrating the host
299 //
300 #define DVFLAGS_NOHOSTMIGRATE 0x00000008
301
302 //
303 // Allow the back button to be enabled in the wizard
304 //
305 #define DVFLAGS_ALLOWBACK 0x00000010
306
307 //
308 // Disable host migration in the voice session
309 //
310 #define DVSESSION_NOHOSTMIGRATION 0x00000001
311
312 //
313 // Server controlled targetting
314 //
315 #define DVSESSION_SERVERCONTROLTARGET 0x00000002
316
317 //
318 // Use DirectSound Normal Mode instead of priority
319 //
320 #define DVSOUNDCONFIG_NORMALMODE 0x00000001
321
322 //
323 // Automatically select the microphone
324 //
325 #define DVSOUNDCONFIG_AUTOSELECT 0x00000002
326
327 //
328 // Run in half duplex mode
329 //
330 #define DVSOUNDCONFIG_HALFDUPLEX 0x00000004
331
332 //
333 // No volume controls are available for the recording device
334 //
335 #define DVSOUNDCONFIG_NORECVOLAVAILABLE 0x00000010
336
337 //
338 // Disable capture sharing
339 //
340 #define DVSOUNDCONFIG_NOFOCUS 0x20000000
341
342 //
343 // Set system conversion quality to high
344 //
345 #define DVSOUNDCONFIG_SETCONVERSIONQUALITY 0x00000008
346
347 //
348 // Enable strict focus mode
349 //
350 #define DVSOUNDCONFIG_STRICTFOCUS 0x40000000
351
352 //
353 // Player is in half duplex mode
354 //
355 #define DVPLAYERCAPS_HALFDUPLEX 0x00000001
356
357 //
358 // Specifies that player is the local player
359 //
360 #define DVPLAYERCAPS_LOCAL 0x00000002
361
362
363 /****************************************************************************
364 *
365 * DirectPlayVoice Structures (Non-Message)
366 *
367 ****************************************************************************/
368
369
370 //
371 // DirectPlayVoice Caps
372 // (GetCaps / SetCaps)
373 //
374 typedef struct
375 {
376 DWORD dwSize; // Size of this structure
377 DWORD dwFlags; // Caps flags
378 } DVCAPS, *LPDVCAPS, *PDVCAPS;
379
380 //
381 // DirectPlayVoice Client Configuration
382 // (Connect / GetClientConfig)
383 //
384 typedef struct
385 {
386 DWORD dwSize; // Size of this structure
387 DWORD dwFlags; // Flags for client config (DVCLIENTCONFIG_...)
388 LONG lRecordVolume; // Recording volume
389 LONG lPlaybackVolume; // Playback volume
390 DWORD dwThreshold; // Voice Activation Threshold
391 DWORD dwBufferQuality; // Buffer quality
392 DWORD dwBufferAggressiveness; // Buffer aggressiveness
393 DWORD dwNotifyPeriod; // Period of notification messages (ms)
394 } DVCLIENTCONFIG, *LPDVCLIENTCONFIG, *PDVCLIENTCONFIG;
395
396 //
397 // DirectPlayVoice Compression Type Information
398 // (GetCompressionTypes)
399 //
400 typedef struct
401 {
402 DWORD dwSize; // Size of this structure
403 GUID guidType; // GUID that identifies this compression type
404 LPWSTR lpszName; // String name of this compression type
405 LPWSTR lpszDescription; // Description for this compression type
406 DWORD dwFlags; // Flags for this compression type
407 DWORD dwMaxBitsPerSecond; // Maximum # of bit/s this compression type uses
408 } DVCOMPRESSIONINFO, *LPDVCOMPRESSIONINFO, *PDVCOMPRESSIONINFO;
409
410 //
411 // DirectPlayVoice Session Description
412 // (Host / GetSessionDesc)
413 //
414 typedef struct
415 {
416 DWORD dwSize; // Size of this structure
417 DWORD dwFlags; // Session flags (DVSESSION_...)
418 DWORD dwSessionType; // Session type (DVSESSIONTYPE_...)
419 GUID guidCT; // Compression Type to use
420 DWORD dwBufferQuality; // Buffer quality
421 DWORD dwBufferAggressiveness; // Buffer aggresiveness
422 } DVSESSIONDESC, *LPDVSESSIONDESC, *PDVSESSIONDESC;
423
424 //
425 // DirectPlayVoice Client Sound Device Configuration
426 // (Connect / GetSoundDeviceConfig)
427 //
428 typedef struct
429 {
430 DWORD dwSize; // Size of this structure
431 DWORD dwFlags; // Flags for sound config (DVSOUNDCONFIG_...)
432 GUID guidPlaybackDevice; // GUID of the playback device to use
433 LPDIRECTSOUND lpdsPlaybackDevice; // DirectSound Object to use (optional)
434 GUID guidCaptureDevice; // GUID of the capture device to use
435 LPDIRECTSOUNDCAPTURE lpdsCaptureDevice; // DirectSoundCapture Object to use (optional)
436 HWND hwndAppWindow; // HWND of your application's top-level window
437 LPDIRECTSOUNDBUFFER lpdsMainBuffer; // DirectSoundBuffer to use for playback (optional)
438 DWORD dwMainBufferFlags; // Flags to pass to Play() on the main buffer
439 DWORD dwMainBufferPriority; // Priority to set when calling Play() on the main buffer
440 } DVSOUNDDEVICECONFIG, *LPDVSOUNDDEVICECONFIG, *PDVSOUNDDEVICECONFIG;
441
442 /****************************************************************************
443 *
444 * DirectPlayVoice message handler call back structures
445 *
446 ****************************************************************************/
447
448 //
449 // Result of the Connect() call. (If it wasn't called Async)
450 // (DVMSGID_CONNECTRESULT)
451 //
452 typedef struct
453 {
454 DWORD dwSize; // Size of this structure
455 HRESULT hrResult; // Result of the Connect() call
456 } DVMSG_CONNECTRESULT, *LPDVMSG_CONNECTRESULT, *PDVMSG_CONNECTRESULT;
457
458 //
459 // A new player has entered the voice session
460 // (DVMSGID_CREATEVOICEPLAYER)
461 //
462 typedef struct
463 {
464 DWORD dwSize; // Size of this structure
465 DVID dvidPlayer; // DVID of the player who joined
466 DWORD dwFlags; // Player flags (DVPLAYERCAPS_...)
467 PVOID pvPlayerContext; // Context value for this player (user set)
468 } DVMSG_CREATEVOICEPLAYER, *LPDVMSG_CREATEVOICEPLAYER, *PDVMSG_CREATEVOICEPLAYER;
469
470 //
471 // A player has left the voice session
472 // (DVMSGID_DELETEVOICEPLAYER)
473 //
474 typedef struct
475 {
476 DWORD dwSize; // Size of this structure
477 DVID dvidPlayer; // DVID of the player who left
478 PVOID pvPlayerContext; // Context value for the player
479 } DVMSG_DELETEVOICEPLAYER, *LPDVMSG_DELETEVOICEPLAYER, *PDVMSG_DELETEVOICEPLAYER;
480
481 //
482 // Result of the Disconnect() call. (If it wasn't called Async)
483 // (DVMSGID_DISCONNECTRESULT)
484 //
485 typedef struct
486 {
487 DWORD dwSize; // Size of this structure
488 HRESULT hrResult; // Result of the Disconnect() call
489 } DVMSG_DISCONNECTRESULT, *LPDVMSG_DISCONNECTRESULT, *PDVMSG_DISCONNECTRESULT;
490
491 //
492 // The voice session host has migrated.
493 // (DVMSGID_HOSTMIGRATED)
494 //
495 typedef struct
496 {
497 DWORD dwSize; // Size of this structure
498 DVID dvidNewHostID; // DVID of the player who is now the host
499 LPDIRECTPLAYVOICESERVER pdvServerInterface;
500 // Pointer to the new host object (if local player is now host)
501 } DVMSG_HOSTMIGRATED, *LPDVMSG_HOSTMIGRATED, *PDVMSG_HOSTMIGRATED;
502
503 //
504 // The current input level / recording volume on the local machine
505 // (DVMSGID_INPUTLEVEL)
506 //
507 typedef struct
508 {
509 DWORD dwSize; // Size of this structure
510 DWORD dwPeakLevel; // Current peak level of the audio
511 LONG lRecordVolume; // Current recording volume
512 PVOID pvLocalPlayerContext; // Context value for the local player
513 } DVMSG_INPUTLEVEL, *LPDVMSG_INPUTLEVEL, *PDVMSG_INPUTLEVEL;
514
515 //
516 // The local client is about to become the new host
517 // (DVMSGID_LOCALHOSTSETUP)
518 //
519 typedef struct
520 {
521 DWORD dwSize; // Size of this structure
522 PVOID pvContext; // Context value to be passed to Initialize() of new host object
523 PDVMESSAGEHANDLER pMessageHandler; // Message handler to be used by new host object
524 } DVMSG_LOCALHOSTSETUP, *LPDVMSG_LOCALHOSTSETUP, *PDVMSG_LOCALHOSTSETUP;
525
526 //
527 // The current output level for the combined output of all incoming streams.
528 // (DVMSGID_OUTPUTLEVEL)
529 //
530 typedef struct
531 {
532 DWORD dwSize; // Size of this structure
533 DWORD dwPeakLevel; // Current peak level of the output
534 LONG lOutputVolume; // Current playback volume
535 PVOID pvLocalPlayerContext; // Context value for the local player
536 } DVMSG_OUTPUTLEVEL, *LPDVMSG_OUTPUTLEVEL, *PDVMSG_OUTPUTLEVEL;
537
538 //
539 // The current peak level of an individual player's incoming audio stream as it is
540 // being played back.
541 // (DVMSGID_PLAYEROUTPUTLEVEL)
542 //
543 typedef struct
544 {
545 DWORD dwSize; // Size of this structure
546 DVID dvidSourcePlayerID; // DVID of the player
547 DWORD dwPeakLevel; // Peak level of the player's stream
548 PVOID pvPlayerContext; // Context value for the player
549 } DVMSG_PLAYEROUTPUTLEVEL, *LPDVMSG_PLAYEROUTPUTLEVEL, *PDVMSG_PLAYEROUTPUTLEVEL;
550
551 //
552 // An audio stream from the specified player has started playing back on the local client.
553 // (DVMSGID_PLAYERVOICESTART).
554 //
555 typedef struct
556 {
557 DWORD dwSize; // Size of this structure
558 DVID dvidSourcePlayerID; // DVID of the Player
559 PVOID pvPlayerContext; // Context value for this player
560 } DVMSG_PLAYERVOICESTART, *LPDVMSG_PLAYERVOICESTART, *PDVMSG_PLAYERVOICESTART;
561
562 //
563 // The audio stream from the specified player has stopped playing back on the local client.
564 // (DVMSGID_PLAYERVOICESTOP)
565 //
566 typedef struct
567 {
568 DWORD dwSize; // Size of this structure
569 DVID dvidSourcePlayerID; // DVID of the player
570 PVOID pvPlayerContext; // Context value for this player
571 } DVMSG_PLAYERVOICESTOP, *LPDVMSG_PLAYERVOICESTOP, *PDVMSG_PLAYERVOICESTOP;
572
573 //
574 // Transmission has started on the local machine
575 // (DVMSGID_RECORDSTART)
576 //
577 typedef struct
578 {
579 DWORD dwSize; // Size of this structure
580 DWORD dwPeakLevel; // Peak level that caused transmission to start
581 PVOID pvLocalPlayerContext; // Context value for the local player
582 } DVMSG_RECORDSTART, *LPDVMSG_RECORDSTART, *PDVMSG_RECORDSTART;
583
584 //
585 // Transmission has stopped on the local machine
586 // (DVMSGID_RECORDSTOP)
587 //
588 typedef struct
589 {
590 DWORD dwSize; // Size of this structure
591 DWORD dwPeakLevel; // Peak level that caused transmission to stop
592 PVOID pvLocalPlayerContext; // Context value for the local player
593 } DVMSG_RECORDSTOP, *LPDVMSG_RECORDSTOP, *PDVMSG_RECORDSTOP;
594
595 //
596 // The voice session has been lost
597 // (DVMSGID_SESSIONLOST)
598 //
599 typedef struct
600 {
601 DWORD dwSize; // Size of this structure
602 HRESULT hrResult; // Reason the session was disconnected
603 } DVMSG_SESSIONLOST, *LPDVMSG_SESSIONLOST, *PDVMSG_SESSIONLOST;
604
605 //
606 // The target list has been updated for the local client
607 // (DVMSGID_SETTARGETS)
608 //
609 typedef struct
610 {
611 DWORD dwSize; // Size of this structure
612 DWORD dwNumTargets; // # of targets
613 PDVID pdvidTargets; // An array of DVIDs specifying the current targets
614 } DVMSG_SETTARGETS, *LPDVMSG_SETTARGETS, *PDVMSG_SETTARGETS;
615
616
617 /****************************************************************************
618 *
619 * DirectPlayVoice Functions
620 *
621 ****************************************************************************/
622
623 extern HRESULT WINAPI DirectPlayVoiceCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
624
625 /****************************************************************************
626 *
627 * DirectPlay8 Application Interfaces
628 *
629 ****************************************************************************/
630
631 #undef INTERFACE
632 #define INTERFACE IDirectPlayVoiceClient
633 DECLARE_INTERFACE_( IDirectPlayVoiceClient, IUnknown )
634 {
635 /*** IUnknown methods ***/
636 STDMETHOD(QueryInterface)(THIS_ REFIID riid, PVOID *ppvObj) PURE;
637 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
638 STDMETHOD_(ULONG,Release)(THIS) PURE;
639 /*** IDirectPlayVoiceClient methods ***/
640 STDMETHOD_(HRESULT, Initialize) (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, PDWORD, DWORD ) PURE;
641 STDMETHOD_(HRESULT, Connect) (THIS_ PDVSOUNDDEVICECONFIG, PDVCLIENTCONFIG, DWORD ) PURE;
642 STDMETHOD_(HRESULT, Disconnect) (THIS_ DWORD ) PURE;
643 STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
644 STDMETHOD_(HRESULT, GetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE;
645 STDMETHOD_(HRESULT, SetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE;
646 STDMETHOD_(HRESULT, GetCaps) (THIS_ PDVCAPS ) PURE;
647 STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE;
648 STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ PDVID, DWORD, DWORD ) PURE;
649 STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ PDVID, PDWORD, DWORD ) PURE;
650 STDMETHOD_(HRESULT, Create3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUNDBUFFER, DWORD, DWORD, LPDIRECTSOUND3DBUFFER * ) PURE;
651 STDMETHOD_(HRESULT, Delete3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUND3DBUFFER * ) PURE;
652 STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE;
653 STDMETHOD_(HRESULT, GetSoundDeviceConfig)( THIS_ PDVSOUNDDEVICECONFIG, PDWORD ) PURE;
654 };
655
656
657 #undef INTERFACE
658 #define INTERFACE IDirectPlayVoiceServer
659 DECLARE_INTERFACE_( IDirectPlayVoiceServer, IUnknown )
660 {
661 /*** IUnknown methods ***/
662 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
663 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
664 STDMETHOD_(ULONG,Release) (THIS) PURE;
665 /*** IDirectPlayVoiceServer methods ***/
666 STDMETHOD_(HRESULT, Initialize) (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, LPDWORD, DWORD ) PURE;
667 STDMETHOD_(HRESULT, StartSession) (THIS_ PDVSESSIONDESC, DWORD ) PURE;
668 STDMETHOD_(HRESULT, StopSession) (THIS_ DWORD ) PURE;
669 STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
670 STDMETHOD_(HRESULT, SetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
671 STDMETHOD_(HRESULT, GetCaps) (THIS_ PDVCAPS ) PURE;
672 STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE;
673 STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ DVID, PDVID, DWORD, DWORD ) PURE;
674 STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ DVID, PDVID, PDWORD, DWORD ) PURE;
675 STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE;
676 };
677
678 #undef INTERFACE
679 #define INTERFACE IDirectPlayVoiceTest
680 DECLARE_INTERFACE_( IDirectPlayVoiceTest, IUnknown )
681 {
682 /*** IUnknown methods ***/
683 STDMETHOD(QueryInterface) (THIS_ REFIID riid, PVOID * ppvObj) PURE;
684 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
685 STDMETHOD_(ULONG,Release) (THIS) PURE;
686 /*** IDirectPlayVoiceTest methods ***/
687 STDMETHOD_(HRESULT, CheckAudioSetup) (THIS_ const GUID *, const GUID * , HWND, DWORD ) PURE;
688 };
689
690 #if !defined(__cplusplus) || defined(CINTERFACE)
691
692 #define IDirectPlayVoiceClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
693 #define IDirectPlayVoiceClient_AddRef(p) (p)->lpVtbl->AddRef(p)
694 #define IDirectPlayVoiceClient_Release(p) (p)->lpVtbl->Release(p)
695
696 #define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e) (p)->lpVtbl->Initialize(p,a,b,c,d,e)
697 #define IDirectPlayVoiceClient_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
698 #define IDirectPlayVoiceClient_Disconnect(p,a) (p)->lpVtbl->Disconnect(p,a)
699 #define IDirectPlayVoiceClient_GetSessionDesc(p,a) (p)->lpVtbl->GetSessionDesc(p,a)
700 #define IDirectPlayVoiceClient_GetClientConfig(p,a) (p)->lpVtbl->GetClientConfig(p,a)
701 #define IDirectPlayVoiceClient_SetClientConfig(p,a) (p)->lpVtbl->SetClientConfig(p,a)
702 #define IDirectPlayVoiceClient_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
703 #define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d)
704 #define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c) (p)->lpVtbl->SetTransmitTargets(p,a,b,c)
705 #define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c) (p)->lpVtbl->GetTransmitTargets(p,a,b,c)
706 #define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e) (p)->lpVtbl->Create3DSoundBuffer(p,a,b,c,d,e)
707 #define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b) (p)->lpVtbl->Delete3DSoundBuffer(p,a,b)
708 #define IDirectPlayVoiceClient_SetNotifyMask(p,a,b) (p)->lpVtbl->SetNotifyMask(p,a,b)
709 #define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b) (p)->lpVtbl->GetSoundDeviceConfig(p,a,b)
710
711 #define IDirectPlayVoiceServer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
712 #define IDirectPlayVoiceServer_AddRef(p) (p)->lpVtbl->AddRef(p)
713 #define IDirectPlayVoiceServer_Release(p) (p)->lpVtbl->Release(p)
714
715 #define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e) (p)->lpVtbl->Initialize(p,a,b,c,d,e)
716 #define IDirectPlayVoiceServer_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
717 #define IDirectPlayVoiceServer_StopSession(p,a) (p)->lpVtbl->StopSession(p,a)
718 #define IDirectPlayVoiceServer_GetSessionDesc(p,a) (p)->lpVtbl->GetSessionDesc(p,a)
719 #define IDirectPlayVoiceServer_SetSessionDesc(p,a) (p)->lpVtbl->SetSessionDesc(p,a)
720 #define IDirectPlayVoiceServer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
721 #define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d)
722 #define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d) (p)->lpVtbl->SetTransmitTargets(p,a,b,c,d)
723 #define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d) (p)->lpVtbl->GetTransmitTargets(p,a,b,c,d)
724 #define IDirectPlayVoiceServer_SetNotifyMask(p,a,b) (p)->lpVtbl->SetNotifyMask(p,a,b)
725 #define IDirectPlayVoiceTest_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
726 #define IDirectPlayVoiceTest_AddRef(p) (p)->lpVtbl->AddRef(p)
727 #define IDirectPlayVoiceTest_Release(p) (p)->lpVtbl->Release(p)
728 #define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d) (p)->lpVtbl->CheckAudioSetup(p,a,b,c,d)
729
730
731 #else /* C++ */
732
733 #define IDirectPlayVoiceClient_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
734 #define IDirectPlayVoiceClient_AddRef(p) (p)->AddRef()
735 #define IDirectPlayVoiceClient_Release(p) (p)->Release()
736
737 #define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e) (p)->Initialize(a,b,c,d,e)
738 #define IDirectPlayVoiceClient_Connect(p,a,b,c) (p)->Connect(a,b,c)
739 #define IDirectPlayVoiceClient_Disconnect(p,a) (p)->Disconnect(a)
740 #define IDirectPlayVoiceClient_GetSessionDesc(p,a) (p)->GetSessionDesc(a)
741 #define IDirectPlayVoiceClient_GetClientConfig(p,a) (p)->GetClientConfig(a)
742 #define IDirectPlayVoiceClient_SetClientConfig(p,a) (p)->SetClientConfig(a)
743 #define IDirectPlayVoiceClient_GetCaps(p,a) (p)->GetCaps(a)
744 #define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d)
745 #define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c) (p)->SetTransmitTargets(a,b,c)
746 #define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c) (p)->GetTransmitTargets(a,b,c)
747 #define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e) (p)->Create3DSoundBuffer(a,b,c,d,e)
748 #define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b) (p)->Delete3DSoundBuffer(a,b)
749 #define IDirectPlayVoiceClient_SetNotifyMask(p,a,b) (p)->SetNotifyMask(a,b)
750 #define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b) (p)->GetSoundDeviceConfig(a,b)
751
752 #define IDirectPlayVoiceServer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
753 #define IDirectPlayVoiceServer_AddRef(p) (p)->AddRef()
754 #define IDirectPlayVoiceServer_Release(p) (p)->Release()
755
756 #define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e) (p)->Initialize(a,b,c,d,e)
757 #define IDirectPlayVoiceServer_StartSession(p,a,b) (p)->StartSession(a,b)
758 #define IDirectPlayVoiceServer_StopSession(p,a) (p)->StopSession(a)
759 #define IDirectPlayVoiceServer_GetSessionDesc(p,a) (p)->GetSessionDesc(a)
760 #define IDirectPlayVoiceServer_SetSessionDesc(p,a) (p)->SetSessionDesc(a)
761 #define IDirectPlayVoiceServer_GetCaps(p,a) (p)->GetCaps(a)
762 #define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d)
763 #define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d) (p)->SetTransmitTargets(a,b,c,d)
764 #define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d) (p)->GetTransmitTargets(a,b,c,d)
765 #define IDirectPlayVoiceServer_SetNotifyMask(p,a,b) (p)->SetNotifyMask(a,b)
766
767 #define IDirectPlayVoiceTest_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
768 #define IDirectPlayVoiceTest_AddRef(p) (p)->AddRef()
769 #define IDirectPlayVoiceTest_Release(p) (p)->Release()
770 #define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d) (p)->CheckAudioSetup(a,b,c,d)
771
772
773 #endif
774
775
776 /****************************************************************************
777 *
778 * DIRECTPLAYVOICE ERRORS
779 *
780 * Errors are represented by negative values and cannot be combined.
781 *
782 ****************************************************************************/
783
784 #define _FACDPV 0x15
785 #define MAKE_DVHRESULT( code ) MAKE_HRESULT( 1, _FACDPV, code )
786
787 #define DV_OK S_OK
788 #define DV_FULLDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x0005 )
789 #define DV_HALFDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x000A )
790 #define DV_PENDING MAKE_HRESULT( 0, _FACDPV, 0x0010 )
791
792 #define DVERR_BUFFERTOOSMALL MAKE_DVHRESULT( 0x001E )
793 #define DVERR_EXCEPTION MAKE_DVHRESULT( 0x004A )
794 #define DVERR_GENERIC E_FAIL
795 #define DVERR_INVALIDFLAGS MAKE_DVHRESULT( 0x0078 )
796 #define DVERR_INVALIDOBJECT MAKE_DVHRESULT( 0x0082 )
797 #define DVERR_INVALIDPARAM E_INVALIDARG
798 #define DVERR_INVALIDPLAYER MAKE_DVHRESULT( 0x0087 )
799 #define DVERR_INVALIDGROUP MAKE_DVHRESULT( 0x0091 )
800 #define DVERR_INVALIDHANDLE MAKE_DVHRESULT( 0x0096 )
801 #define DVERR_OUTOFMEMORY E_OUTOFMEMORY
802 #define DVERR_PENDING DV_PENDING
803 #define DVERR_NOTSUPPORTED E_NOTIMPL
804 #define DVERR_NOINTERFACE E_NOINTERFACE
805 #define DVERR_SESSIONLOST MAKE_DVHRESULT( 0x012C )
806 #define DVERR_NOVOICESESSION MAKE_DVHRESULT( 0x012E )
807 #define DVERR_CONNECTIONLOST MAKE_DVHRESULT( 0x0168 )
808 #define DVERR_NOTINITIALIZED MAKE_DVHRESULT( 0x0169 )
809 #define DVERR_CONNECTED MAKE_DVHRESULT( 0x016A )
810 #define DVERR_NOTCONNECTED MAKE_DVHRESULT( 0x016B )
811 #define DVERR_CONNECTABORTING MAKE_DVHRESULT( 0x016E )
812 #define DVERR_NOTALLOWED MAKE_DVHRESULT( 0x016F )
813 #define DVERR_INVALIDTARGET MAKE_DVHRESULT( 0x0170 )
814 #define DVERR_TRANSPORTNOTHOST MAKE_DVHRESULT( 0x0171 )
815 #define DVERR_COMPRESSIONNOTSUPPORTED MAKE_DVHRESULT( 0x0172 )
816 #define DVERR_ALREADYPENDING MAKE_DVHRESULT( 0x0173 )
817 #define DVERR_SOUNDINITFAILURE MAKE_DVHRESULT( 0x0174 )
818 #define DVERR_TIMEOUT MAKE_DVHRESULT( 0x0175 )
819 #define DVERR_CONNECTABORTED MAKE_DVHRESULT( 0x0176 )
820 #define DVERR_NO3DSOUND MAKE_DVHRESULT( 0x0177 )
821 #define DVERR_ALREADYBUFFERED MAKE_DVHRESULT( 0x0178 )
822 #define DVERR_NOTBUFFERED MAKE_DVHRESULT( 0x0179 )
823 #define DVERR_HOSTING MAKE_DVHRESULT( 0x017A )
824 #define DVERR_NOTHOSTING MAKE_DVHRESULT( 0x017B )
825 #define DVERR_INVALIDDEVICE MAKE_DVHRESULT( 0x017C )
826 #define DVERR_RECORDSYSTEMERROR MAKE_DVHRESULT( 0x017D )
827 #define DVERR_PLAYBACKSYSTEMERROR MAKE_DVHRESULT( 0x017E )
828 #define DVERR_SENDERROR MAKE_DVHRESULT( 0x017F )
829 #define DVERR_USERCANCEL MAKE_DVHRESULT( 0x0180 )
830 #define DVERR_RUNSETUP MAKE_DVHRESULT( 0x0183 )
831 #define DVERR_INCOMPATIBLEVERSION MAKE_DVHRESULT( 0x0184 )
832 #define DVERR_INITIALIZED MAKE_DVHRESULT( 0x0187 )
833 #define DVERR_INVALIDPOINTER E_POINTER
834 #define DVERR_NOTRANSPORT MAKE_DVHRESULT( 0x0188 )
835 #define DVERR_NOCALLBACK MAKE_DVHRESULT( 0x0189 )
836 #define DVERR_TRANSPORTNOTINIT MAKE_DVHRESULT( 0x018A )
837 #define DVERR_TRANSPORTNOSESSION MAKE_DVHRESULT( 0x018B )
838 #define DVERR_TRANSPORTNOPLAYER MAKE_DVHRESULT( 0x018C )
839 #define DVERR_USERBACK MAKE_DVHRESULT( 0x018D )
840 #define DVERR_NORECVOLAVAILABLE MAKE_DVHRESULT( 0x018E )
841 #define DVERR_INVALIDBUFFER MAKE_DVHRESULT( 0x018F )
842 #define DVERR_LOCKEDBUFFER MAKE_DVHRESULT( 0x0190 )
843
844 #ifdef __cplusplus
845 }
846 #endif
847
848 #endif
849
850

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26