-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDirectSound.pas
2427 lines (2088 loc) · 101 KB
/
DirectSound.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{******************************************************************************}
{* *}
{* Copyright (C) Microsoft Corporation. All Rights Reserved. *}
{* *}
{* Files: dsound.h *}
{* Content: DirectSound include file *}
{* *}
{* DirectX 9.0 Delphi adaptation by Alexey Barkovoy *}
{* E-Mail: clootie@reactor.ru *}
{* *}
{* Modified: 27-Apr-2003 *}
{* *}
{* Compatible with : *}
{* DirectX 7.0 Object Pascal adaptation by *}
{* Erik Unger, e-Mail: DelphiDirectX@next-reality.com *}
{* *}
{* Latest version can be downloaded from: *}
{* http://clootie.narod.ru/delphi *}
{* *}
{******************************************************************************}
{ }
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ The contents of this file are used with permission, subject to the Mozilla }
{ Public License Version 1.1 (the "License"); you may not use this file except }
{ in compliance with the License. You may obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an "AS IS" basis, }
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
{ the specific language governing rights and limitations under the License. }
{ }
{ Alternatively, the contents of this file may be used under the terms of the }
{ GNU Lesser General Public License (the "LGPL License"), in which case the }
{ provisions of the LGPL License are applicable instead of those above. }
{ If you wish to allow use of your version of this file only under the terms }
{ of the LGPL License and not to allow others to use your version of this file }
{ under the MPL, indicate your decision by deleting the provisions above and }
{ replace them with the notice and other provisions required by the LGPL }
{ License. If you do not delete the provisions above, a recipient may use }
{ your version of this file under either the MPL or the LGPL License. }
{ }
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
{ }
{******************************************************************************}
unit DirectSound;
interface
uses
Windows, MMSystem, DXTypes;
(*==========================================================================;
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* File: dsound.h
* Content: DirectSound include file
*
**************************************************************************)
{$I DirectX.inc}
////////////////////////////////////////////////////////////////////////
// Global level dynamic loading support
{$IFDEF DYNAMIC_LINK_ALL}
{$DEFINE DIRECTSOUND_DYNAMIC_LINK}
{$ENDIF}
{$IFDEF DYNAMIC_LINK_EXPLICIT_ALL}
{$DEFINE DIRECTSOUND_DYNAMIC_LINK_EXPLICIT}
{$ENDIF}
// Remove "dots" below to force some kind of dynamic linking
{.$DEFINE DIRECTSOUND_DYNAMIC_LINK}
{.$DEFINE DIRECTSOUND_DYNAMIC_LINK_EXPLICIT}
////////////////////////////////////////////////////////////////////////
// Assume for what DirectSound version we will compile headers
{$IFDEF DIRECTX7}
{$DEFINE DIRECTSOUND_VERSION_7}
{$ENDIF}
{$IFDEF DIRECTX8}
{$DEFINE DIRECTSOUND_VERSION_8}
{$ENDIF}
{$IFDEF DIRECTX9}
{$DEFINE DIRECTSOUND_VERSION_9}
{$ENDIF}
{$IFNDEF DIRECTSOUND_VERSION_9}
{$IFNDEF DIRECTSOUND_VERSION_8}
{$IFNDEF DIRECTSOUND_VERSION_7}
// Compiling for DirectSound9 by default
{$DEFINE DIRECTSOUND_VERSION_9}
{$ENDIF}
{$ENDIF}
{$ENDIF}
////////////////////////////////////////////////////////////////////////
// Emit conditionals to C++Builder compiler
{$IFDEF DIRECTSOUND_VERSION_7}
{$HPPEMIT '#define DIRECTSOUND_VERSION 0x0700'}
{$ENDIF}
{$IFDEF DIRECTSOUND_VERSION_8}
{$HPPEMIT '#define DIRECTSOUND_VERSION 0x0800'}
{$ENDIF}
{$IFDEF DIRECTSOUND_VERSION_9}
{$HPPEMIT '#define DIRECTSOUND_VERSION 0x0900'}
{$ENDIF}
{$NOINCLUDE DXTypes}
(*$HPPEMIT '#include "dsound.h"' *)
////////////////////////////////////////////////////////////////////////
// Define symbols for '<=' comparision
{$IFDEF DIRECTSOUND_VERSION_9}
{$DEFINE DIRECTSOUND_VERSION_8}
{$ENDIF}
{$IFDEF DIRECTSOUND_VERSION_8}
{$DEFINE DIRECTSOUND_VERSION_7}
{$ENDIF}
{ Type definitions shared with Direct3D }
type
D3DVALUE = DXTypes.D3DVALUE;
{$EXTERNALSYM D3DVALUE}
TD3DValue = DXTypes.TD3DValue;
{$NODEFINE TD3DValue}
PD3DValue = DXTypes.PD3DValue;
{$NODEFINE PD3DValue}
D3DCOLOR = DXTypes.D3DCOLOR;
{$EXTERNALSYM D3DCOLOR}
TD3DColor = DXTypes.TD3DColor;
{$NODEFINE TD3DColor}
_D3DVECTOR = DXTypes._D3DVECTOR;
{$EXTERNALSYM _D3DVECTOR}
D3DVECTOR = DXTypes.D3DVECTOR;
{$EXTERNALSYM D3DVECTOR}
TD3DVector = DXTypes.TD3DVector;
{$NODEFINE TD3DVector}
PD3DVector = DXTypes.PD3DVector;
{$NODEFINE PD3DVector}
{$HPPEMIT ''}
{$HPPEMIT '#ifndef DX_SHARED_DEFINES_BCB'}
{$HPPEMIT ''}
{$HPPEMIT 'typedef D3DVALUE TD3DValue;'}
{$HPPEMIT 'typedef D3DVALUE *PD3DValue;'}
{$HPPEMIT ''}
{$HPPEMIT '#ifndef D3DCOLOR_DEFINED_BCB'}
{$HPPEMIT 'typedef D3DCOLOR TD3DColor;'}
{$HPPEMIT '#define D3DCOLOR_DEFINED_BCB'}
{$HPPEMIT '#endif'}
{$HPPEMIT ''}
{$HPPEMIT '#ifndef D3DVECTOR_DEFINED_BCB'}
{$HPPEMIT 'typedef _D3DVECTOR TD3DVector;'}
{$HPPEMIT 'typedef _D3DVECTOR *PD3DVector;'}
{$HPPEMIT '#define D3DVECTOR_DEFINED_BCB'}
{$HPPEMIT '#endif'}
{$HPPEMIT ''}
{$HPPEMIT '#define DX_SHARED_DEFINES_BCB'}
{$HPPEMIT '#endif // DX_SHARED_DEFINES_BCB'}
{$HPPEMIT ''}
const
_FACDS = $878; { DirectSound's facility code }
{$EXTERNALSYM _FACDS}
// #define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code)
function MAKE_DSHRESULT(Code: DWord): DWord;
{$EXTERNALSYM MAKE_DSHRESULT}
const
MAKE_DSHRESULT_R = (1 shl 31) or (_FACDS shl 16);
const
// DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000}
CLSID_DirectSound: TGUID = '{47d4d946-62e8-11cf-93bc-444553540000}';
{$EXTERNALSYM CLSID_DirectSound}
// DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
CLSID_DirectSound8: TGUID = '{3901cc3f-84b5-4fa4-ba35-aa8172b8a09b}';
{$EXTERNALSYM CLSID_DirectSound8}
// DirectSound Capture Component GUID {B0210780-89CD-11D0-AF08-00A0C925CD16}
CLSID_DirectSoundCapture: TGUID = '{b0210780-89cd-11d0-af08-00a0c925cd16}';
{$EXTERNALSYM CLSID_DirectSoundCapture}
// DirectSound 8.0 Capture Component GUID {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}
CLSID_DirectSoundCapture8: TGUID = '{e4bcac13-7f99-4908-9a8e-74e3bf24b6e1}';
{$EXTERNALSYM CLSID_DirectSoundCapture8}
// DirectSound Full Duplex Component GUID {FEA4300C-7959-4147-B26A-2377B9E7A91D}
CLSID_DirectSoundFullDuplex: TGUID = '{fea4300c-7959-4147-b26a-2377b9e7a91d}';
{$EXTERNALSYM CLSID_DirectSoundFullDuplex}
// DirectSound default playback device GUID {DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03}
DSDEVID_DefaultPlayback: TGUID = '{def00000-9c6d-47ed-aaf1-4dda8f2b5c03}';
{$EXTERNALSYM DSDEVID_DefaultPlayback}
// DirectSound default capture device GUID {DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03}
DSDEVID_DefaultCapture: TGUID = '{def00001-9c6d-47ed-aaf1-4dda8f2b5c03}';
{$EXTERNALSYM DSDEVID_DefaultCapture}
// DirectSound default device for voice playback {DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03}
DSDEVID_DefaultVoicePlayback: TGUID = '{def00002-9c6d-47ed-aaf1-4dda8f2b5c03}';
{$EXTERNALSYM DSDEVID_DefaultVoicePlayback}
// DirectSound default device for voice capture {DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03}
DSDEVID_DefaultVoiceCapture: TGUID = '{def00003-9c6d-47ed-aaf1-4dda8f2b5c03}';
{$EXTERNALSYM DSDEVID_DefaultVoiceCapture}
//
// Structures
//
type
PDSCaps = ^TDSCaps;
_DSCAPS = packed record
dwSize : DWORD;
dwFlags : DWORD;
dwMinSecondarySampleRate : DWORD;
dwMaxSecondarySampleRate : DWORD;
dwPrimaryBuffers : DWORD;
dwMaxHwMixingAllBuffers : DWORD;
dwMaxHwMixingStaticBuffers : DWORD;
dwMaxHwMixingStreamingBuffers : DWORD;
dwFreeHwMixingAllBuffers : DWORD;
dwFreeHwMixingStaticBuffers : DWORD;
dwFreeHwMixingStreamingBuffers : DWORD;
dwMaxHw3DAllBuffers : DWORD;
dwMaxHw3DStaticBuffers : DWORD;
dwMaxHw3DStreamingBuffers : DWORD;
dwFreeHw3DAllBuffers : DWORD;
dwFreeHw3DStaticBuffers : DWORD;
dwFreeHw3DStreamingBuffers : DWORD;
dwTotalHwMemBytes : DWORD;
dwFreeHwMemBytes : DWORD;
dwMaxContigFreeHwMemBytes : DWORD;
dwUnlockTransferRateHwBuffers : DWORD;
dwPlayCpuOverheadSwBuffers : DWORD;
dwReserved1 : DWORD;
dwReserved2 : DWORD;
end;
{$EXTERNALSYM _DSCAPS}
DSCAPS = _DSCAPS;
{$EXTERNALSYM DSCAPS}
TDSCaps = _DSCAPS;
PDSBcaps = ^TDSBcaps;
_DSBCAPS = packed record
dwSize : DWORD;
dwFlags : DWORD;
dwBufferBytes : DWORD;
dwUnlockTransferRate : DWORD;
dwPlayCpuOverhead : DWORD;
end;
{$EXTERNALSYM _DSBCAPS}
DSBCAPS = _DSBCAPS;
{$EXTERNALSYM DSBCAPS}
TDSBcaps = _DSBCAPS;
{$IFDEF DIRECTSOUND_VERSION_8} // #if DIRECTSOUND_VERSION >= 0x0800
{$IFDEF WIN64}
DWORD_PTR = Int64;
{$ELSE}
DWORD_PTR = DWORD;
{$ENDIF}
{$NODEFINE DWORD_PTR}
PDSEffectDesc = ^TDSEffectDesc;
_DSEFFECTDESC = packed record
dwSize : DWORD;
dwFlags : DWORD;
guidDSFXClass : TGUID;
dwReserved1 : DWORD_PTR;
dwReserved2 : DWORD_PTR;
end;
{$EXTERNALSYM _DSEFFECTDESC}
DSEFFECTDESC = _DSEFFECTDESC;
{$EXTERNALSYM DSEFFECTDESC}
TDSEffectDesc = _DSEFFECTDESC;
const
DSFX_LOCHARDWARE = $00000001;
{$EXTERNALSYM DSFX_LOCHARDWARE}
DSFX_LOCSOFTWARE = $00000002;
{$EXTERNALSYM DSFX_LOCSOFTWARE}
DSFXR_PRESENT = 0;
{$EXTERNALSYM DSFXR_PRESENT}
DSFXR_LOCHARDWARE = 1;
{$EXTERNALSYM DSFXR_LOCHARDWARE}
DSFXR_LOCSOFTWARE = 2;
{$EXTERNALSYM DSFXR_LOCSOFTWARE}
DSFXR_UNALLOCATED = 3;
{$EXTERNALSYM DSFXR_UNALLOCATED}
DSFXR_FAILED = 4;
{$EXTERNALSYM DSFXR_FAILED}
DSFXR_UNKNOWN = 5;
{$EXTERNALSYM DSFXR_UNKNOWN}
DSFXR_SENDLOOP = 6;
{$EXTERNALSYM DSFXR_SENDLOOP}
type
PDSCEffectDesc = ^TDSCEffectDesc;
_DSCEFFECTDESC = packed record
dwSize: DWORD;
dwFlags: DWORD;
guidDSCFXClass: TGUID;
guidDSCFXInstance: TGUID;
dwReserved1: DWORD;
dwReserved2: DWORD;
end;
{$EXTERNALSYM _DSCEFFECTDESC}
DSCEFFECTDESC = _DSCEFFECTDESC;
{$EXTERNALSYM DSCEFFECTDESC}
TDSCEffectDesc = _DSCEFFECTDESC;
const
DSCFX_LOCHARDWARE = $00000001;
{$EXTERNALSYM DSCFX_LOCHARDWARE}
DSCFX_LOCSOFTWARE = $00000002;
{$EXTERNALSYM DSCFX_LOCSOFTWARE}
DSCFXR_LOCHARDWARE = $00000010;
{$EXTERNALSYM DSCFXR_LOCHARDWARE}
DSCFXR_LOCSOFTWARE = $00000020;
{$EXTERNALSYM DSCFXR_LOCSOFTWARE}
{$ENDIF} // DIRECTSOUND_VERSION >= 0x0800
type
PDSBufferDesc = ^TDSBufferDesc;
_DSBUFFERDESC = packed record
dwSize: DWORD;
dwFlags: DWORD;
dwBufferBytes: DWORD;
dwReserved: DWORD;
lpwfxFormat: PWaveFormatEx;
{$IFDEF DIRECTSOUND_VERSION_7} // #if DIRECTSOUND_VERSION >= 0x0700
guid3DAlgorithm: TGUID;
{$ENDIF} // DIRECTSOUND_VERSION >= 0x0700
end;
{$EXTERNALSYM _DSBUFFERDESC}
DSBUFFERDESC = _DSBUFFERDESC;
{$EXTERNALSYM DSBUFFERDESC}
TDSBufferDesc = _DSBUFFERDESC;
// Older version of this structure:
PDSBufferDesc1 = ^TDSBufferDesc1;
_DSBUFFERDESC1 = packed record
dwSize: DWORD;
dwFlags: DWORD;
dwBufferBytes: DWORD;
dwReserved: DWORD;
lpwfxFormat: PWaveFormatEx;
end;
{$EXTERNALSYM _DSBUFFERDESC1}
DSBUFFERDESC1 = _DSBUFFERDESC1;
{$EXTERNALSYM DSBUFFERDESC1}
TDSBufferDesc1 = _DSBUFFERDESC1;
PDS3DBuffer = ^TDS3DBuffer;
_DS3DBUFFER = packed record
dwSize: DWORD;
vPosition: TD3DVector;
vVelocity: TD3DVector;
dwInsideConeAngle: DWORD;
dwOutsideConeAngle: DWORD;
vConeOrientation: TD3DVector;
lConeOutsideVolume: Longint;
flMinDistance: TD3DValue;
flMaxDistance: TD3DValue;
dwMode: DWORD;
end;
{$EXTERNALSYM _DS3DBUFFER}
DS3DBUFFER = _DS3DBUFFER;
{$EXTERNALSYM DS3DBUFFER}
TDS3DBuffer = _DS3DBUFFER;
PDS3DListener = ^TDS3DListener;
_DS3DLISTENER = packed record
dwSize: DWORD;
vPosition: TD3DVector;
vVelocity: TD3DVector;
vOrientFront: TD3DVector;
vOrientTop: TD3DVector;
flDistanceFactor: TD3DValue;
flRolloffFactor: TD3DValue;
flDopplerFactor: TD3DValue;
end;
{$EXTERNALSYM _DS3DLISTENER}
DS3DLISTENER = _DS3DLISTENER;
{$EXTERNALSYM DS3DLISTENER}
TDS3DListener = _DS3DLISTENER;
PDSCcaps = ^TDSCcaps;
_DSCCAPS = packed record
dwSize: DWORD;
dwFlags: DWORD;
dwFormats: DWORD;
dwChannels: DWORD;
end;
{$EXTERNALSYM _DSCCAPS}
DSCCAPS = _DSCCAPS;
{$EXTERNALSYM DSCCAPS}
TDSCcaps = _DSCCAPS;
PDSCBufferDesc1 = ^TDSCBufferDesc1;
_DSCBUFFERDESC1 = packed record
dwSize: DWORD;
dwFlags: DWORD;
dwBufferBytes: DWORD;
dwReserved: DWORD;
lpwfxFormat: PWaveFormatEx;
end;
{$EXTERNALSYM _DSCBUFFERDESC1}
DSCBUFFERDESC1 = _DSCBUFFERDESC1;
{$EXTERNALSYM DSCBUFFERDESC1}
TDSCBufferDesc1 = _DSCBUFFERDESC1;
PDSCBufferDesc = ^TDSCBufferDesc;
_DSCBUFFERDESC = packed record
dwSize: DWORD;
dwFlags: DWORD;
dwBufferBytes: DWORD;
dwReserved: DWORD;
lpwfxFormat: PWaveFormatEx;
{$IFDEF DIRECTSOUND_VERSION_8} // #if DIRECTSOUND_VERSION >= 0x0800
dwFXCount: DWORD;
lpDSCFXDesc: PDSCEffectDesc;
{$ENDIF} // DIRECTSOUND_VERSION >= 0x0800
end;
{$EXTERNALSYM _DSCBUFFERDESC}
DSCBUFFERDESC = _DSCBUFFERDESC;
{$EXTERNALSYM DSCBUFFERDESC}
TDSCBufferDesc = _DSCBUFFERDESC;
PDSCBCaps = ^TDSCBCaps;
_DSCBCAPS = packed record
dwSize: DWORD;
dwFlags: DWORD;
dwBufferBytes: DWORD;
dwReserved: DWORD;
end;
{$EXTERNALSYM _DSCBCAPS}
DSCBCAPS = _DSCBCAPS;
{$EXTERNALSYM DSCBCAPS}
TDSCBCaps = _DSCBCAPS;
PDSBPositionNotify = ^TDSBPositionNotify;
_DSBPOSITIONNOTIFY = packed record
dwOffset: DWORD;
hEventNotify: THandle;
end;
{$EXTERNALSYM _DSBPOSITIONNOTIFY}
DSBPOSITIONNOTIFY = _DSBPOSITIONNOTIFY;
{$EXTERNALSYM DSBPOSITIONNOTIFY}
TDSBPositionNotify = _DSBPOSITIONNOTIFY;
type
PReferenceTime = ^TReferenceTime;
REFERENCE_TIME = LONGLONG;
{$EXTERNALSYM REFERENCE_TIME}
TReferenceTime = REFERENCE_TIME;
type
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IReferenceClock);'}
{$EXTERNALSYM IReferenceClock}
IReferenceClock = interface(IUnknown)
['{56a86897-0ad4-11ce-b03a-0020af0ba770}']
// IReferenceClock methods
function GetTime(out pTime: TReferenceTime): HResult; stdcall;
function AdviseTime(rtBaseTime, rtStreamTime: TReferenceTime; hEvent: THandle; out pdwAdviseCookie: DWORD): HResult; stdcall;
function AdvisePeriodic(const rtStartTime, rtPeriodTime: TReferenceTime; hSemaphore: THandle; out pdwAdviseCookie: DWORD): HResult; stdcall;
function Unadvise(dwAdviseCookie: DWORD): HResult; stdcall;
end;
IID_IReferenceClock = IReferenceClock;
{$EXTERNALSYM IID_IReferenceClock}
IDirectSoundBuffer = interface;
//
// IDirectSound
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSound);'}
{$EXTERNALSYM IDirectSound}
IDirectSound = interface(IUnknown)
['{279AFA83-4981-11CE-A521-0020AF0BE560}']
// IDirectSound methods
function CreateSoundBuffer(const pcDSBufferDesc: TDSBufferDesc; out ppDSBuffer: IDirectSoundBuffer; pUnkOuter: IUnknown): HResult; stdcall;
function GetCaps(out pDSCaps: TDSCaps): HResult; stdcall;
function DuplicateSoundBuffer(pDSBufferOriginal: IDirectSoundBuffer; out ppDSBufferDuplicate: IDirectSoundBuffer): HResult; stdcall;
function SetCooperativeLevel(hwnd: HWND; dwLevel: DWORD): HResult; stdcall;
function Compact: HResult; stdcall;
function GetSpeakerConfig(out pdwSpeakerConfig: DWORD): HResult; stdcall;
function SetSpeakerConfig(dwSpeakerConfig: DWORD): HResult; stdcall;
function Initialize(pcGuidDevice: PGUID): HResult; stdcall;
end;
IID_IDirectSound = IDirectSound;
{$EXTERNALSYM IID_IDirectSound}
{$IFDEF DIRECTSOUND_VERSION_8} // #if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSound8
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSound8);'}
{$EXTERNALSYM IDirectSound8}
IDirectSound8 = interface(IDirectSound)
['{C50A7E93-F395-4834-9EF6-7FA99DE50966}']
// IDirectSound8 methods
function VerifyCertification(pdwCertified: PDWORD): HResult; stdcall;
end;
IID_IDirectSound8 = IDirectSound8;
{$EXTERNALSYM IID_IDirectSound8}
{$ENDIF} // DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundBuffer
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundBuffer);'}
{$EXTERNALSYM IDirectSoundBuffer}
IDirectSoundBuffer = interface(IUnknown)
['{279AFA85-4981-11CE-A521-0020AF0BE560}']
// IDirectSoundBuffer methods
function GetCaps(var pDSBufferCaps: TDSBcaps): HResult; stdcall;
function GetCurrentPosition(pdwCurrentPlayCursor, pdwCurrentWriteCursor: PDWORD): HResult; stdcall;
function GetFormat(pwfxFormat: PWaveFormatEx; dwSizeAllocated: DWORD; pdwSizeWritten: PDWORD): HResult; stdcall;
function GetVolume(out plVolume: Longint): HResult; stdcall;
function GetPan(out plPan: Longint): HResult; stdcall;
function GetFrequency(out pdwFrequency: DWORD): HResult; stdcall;
function GetStatus(out pdwStatus: DWORD): HResult; stdcall;
function Initialize(pDirectSound: IDirectSound; const pcDSBufferDesc: TDSBufferDesc): HResult; stdcall;
function Lock(dwOffset, dwBytes: DWORD; out ppvAudioPtr1: Pointer; out pdwAudioBytes1: DWORD;
out ppvAudioPtr2: Pointer; out pdwAudioBytes2: DWORD; dwFlags: DWORD): HResult; stdcall;
function Play(dwReserved1, dwPriority, dwFlags: DWORD): HResult; stdcall;
function SetCurrentPosition(dwNewPosition: DWORD): HResult; stdcall;
function SetFormat(pcfxFormat: PWaveFormatEx): HResult; stdcall;
function SetVolume(lVolume: Longint): HResult; stdcall;
function SetPan(lPan: Longint): HResult; stdcall;
function SetFrequency(dwFrequency: DWORD): HResult; stdcall;
function Stop: HResult; stdcall;
function Unlock(pvAudioPtr1: Pointer; dwAudioBytes1: DWORD; pvAudioPtr2: Pointer; dwAudioBytes2: DWORD): HResult; stdcall;
function Restore: HResult; stdcall;
end;
IID_IDirectSoundBuffer = IDirectSoundBuffer;
{$EXTERNALSYM IID_IDirectSoundBuffer}
{$IFDEF DIRECTSOUND_VERSION_8} // #if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundBuffer8
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundBuffer8);'}
{$EXTERNALSYM IDirectSoundBuffer8}
IDirectSoundBuffer8 = interface(IDirectSoundBuffer)
['{6825a449-7524-4d82-920f-50e36ab3ab1e}']
// IDirectSoundBuffer8 methods
function SetFX(dwEffectsCount: DWORD; pDSFXDesc: PDSEffectDesc; pdwResultCodes: PDWORD): HResult; stdcall;
function AcquireResources(dwFlags, dwEffectsCount, pdwResultCodes: PDWORD): HResult; stdcall;
function GetObjectInPath(const rguidObject: TGUID; dwIndex: DWORD; const rguidInterface: TGUID; out ppObject{IUnknown}): HResult; stdcall;
end;
IID_IDirectSoundBuffer8 = IDirectSoundBuffer8;
{$EXTERNALSYM IID_IDirectSoundBuffer8}
const
// Special GUID meaning "select all objects" for use in GetObjectInPath()
GUID_All_Objects: TGUID = '{aa114de5-c262-4169-a1c8-23d698cc73b5}';
{$EXTERNALSYM GUID_All_Objects}
type
{$ENDIF} // DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSound3DListener
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSound3DListener);'}
{$EXTERNALSYM IDirectSound3DListener}
IDirectSound3DListener = interface(IUnknown)
['{279AFA84-4981-11CE-A521-0020AF0BE560}']
// IDirectSound3DListener methods
function GetAllParameters(var pListener: TDS3DListener): HResult; stdcall;
function GetDistanceFactor(out pflDistanceFactor: TD3DValue): HResult; stdcall;
function GetDopplerFactor(out pflDopplerFactor: TD3DValue): HResult; stdcall;
function GetOrientation(out pvOrientFront, pvOrientTop: TD3DVector): HResult; stdcall;
function GetPosition(out pvPosition: TD3DVector): HResult; stdcall;
function GetRolloffFactor(out pflRolloffFactor: TD3DValue): HResult; stdcall;
function GetVelocity(out pvVelocity: TD3DVector): HResult; stdcall;
function SetAllParameters(const pcListener: TDS3DListener; dwApply: DWORD): HResult; stdcall;
function SetDistanceFactor(flDistanceFactor: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetDopplerFactor(flDopplerFactor: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetOrientation(xFront, yFront, zFront: TD3DValue; xTop, yTop, zTop: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetPosition(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetRolloffFactor(flRolloffFactor: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetVelocity(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
function CommitDeferredSettings: HResult; stdcall;
end;
IID_IDirectSound3DListener = IDirectSound3DListener;
{$EXTERNALSYM IID_IDirectSound3DListener}
//
// IDirectSound3DBuffer
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSound3DBuffer);'}
{$EXTERNALSYM IDirectSound3DBuffer}
IDirectSound3DBuffer = interface(IUnknown)
['{279AFA86-4981-11CE-A521-0020AF0BE560}']
// IDirectSound3DBuffer methods
function GetAllParameters(var pDs3dBuffer: TDS3DBuffer): HResult; stdcall;
function GetConeAngles(var pdwInsideConeAngle, pdwOutsideConeAngle: DWORD): HResult; stdcall;
function GetConeOrientation(out pvOrientation: TD3DVector): HResult; stdcall;
function GetConeOutsideVolume(out plConeOutsideVolume: Longint): HResult; stdcall;
function GetMaxDistance(out pflMaxDistance: TD3DValue): HResult; stdcall;
function GetMinDistance(out pflMinDistance: TD3DValue): HResult; stdcall;
function GetMode(out pdwMode: DWORD): HResult; stdcall;
function GetPosition(out pvPosition: TD3DVector): HResult; stdcall;
function GetVelocity(out pvVelocity: TD3DVector): HResult; stdcall;
function SetAllParameters(const pcDs3dBuffer: TDS3DBuffer; dwApply: DWORD): HResult; stdcall;
function SetConeAngles(dwInsideConeAngle, dwOutsideConeAngle: DWORD; dwApply: DWORD): HResult; stdcall;
function SetConeOrientation(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetConeOutsideVolume(lConeOutsideVolume: Longint; dwApply: DWORD): HResult; stdcall;
function SetMaxDistance(flMaxDistance: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetMinDistance(flMinDistance: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetMode(dwMode: DWORD; dwApply: DWORD): HResult; stdcall;
function SetPosition(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
function SetVelocity(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
end;
IID_IDirectSound3DBuffer = IDirectSound3DBuffer;
{$EXTERNALSYM IID_IDirectSound3DBuffer}
IDirectSoundCaptureBuffer = interface;
//
// IDirectSoundCapture
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundCapture);'}
{$EXTERNALSYM IDirectSoundCapture}
IDirectSoundCapture = interface(IUnknown)
['{b0210781-89cd-11d0-af08-00a0c925cd16}']
// IDirectSoundCapture methods
function CreateCaptureBuffer(const pcDSCBufferDesc: TDSCBufferDesc; out ppDSCBuffer: IDirectSoundCaptureBuffer; pUnkOuter: IUnknown): HResult; stdcall;
function GetCaps(var pDSCCaps: TDSCcaps): HResult; stdcall;
function Initialize(pcGuidDevice: PGUID): HResult; stdcall;
end;
IID_IDirectSoundCapture = IDirectSoundCapture;
{$EXTERNALSYM IID_IDirectSoundCapture}
//
// IDirectSoundCaptureBuffer
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundCaptureBuffer);'}
{$EXTERNALSYM IDirectSoundCaptureBuffer}
IDirectSoundCaptureBuffer = interface(IUnknown)
['{b0210782-89cd-11d0-af08-00a0c925cd16}']
// IDirectSoundCaptureBuffer methods
function GetCaps(var pDSCBCaps: TDSCBCaps): HResult; stdcall;
function GetCurrentPosition(pdwCapturePosition, pdwReadPosition: PDWORD): HResult; stdcall;
function GetFormat(pwfxFormat: PWaveFormatEx; dwSizeAllocated: DWORD; pdwSizeWritten: PDWORD): HResult; stdcall;
function GetStatus(pdwStatus: PDWORD): HResult; stdcall;
function Initialize(pDirectSoundCapture: IDirectSoundCapture; const pcDSCBufferDesc: TDSCBufferDesc): HResult; stdcall;
function Lock(dwOffset, dwBytes: DWORD; out ppvAudioPtr1: Pointer; out pdwAudioBytes1: DWORD; out ppvAudioPtr2: Pointer; out pdwAudioBytes2: DWORD; dwFlags: DWORD): HResult; stdcall;
function Start(dwFlags: DWORD): HResult; stdcall;
function Stop: HResult; stdcall;
function Unlock(pvAudioPtr1: Pointer; dwAudioBytes1: DWORD; pvAudioPtr2: Pointer; dwAudioBytes2: DWORD): HResult; stdcall;
end;
IID_IDirectSoundCaptureBuffer = IDirectSoundCaptureBuffer;
{$EXTERNALSYM IID_IDirectSoundCaptureBuffer}
{$IFDEF DIRECTSOUND_VERSION_8} // #if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundCaptureBuffer8
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundCaptureBuffer8);'}
{$EXTERNALSYM IDirectSoundCaptureBuffer8}
IDirectSoundCaptureBuffer8 = interface(IDirectSoundCaptureBuffer)
['{00990df4-0dbb-4872-833e-6d303e80aeb6}']
// IDirectSoundCaptureBuffer8 methods
function GetObjectInPath(const rguidObject: TGUID; dwIndex: DWORD; const rguidInterface: TGUID; out ppObject{IUnknown}): HResult; stdcall;
function GetFXStatus(dwFXCount: DWORD; pdwFXStatus: PDWORD): HResult; stdcall;
end;
IID_IDirectSoundCaptureBuffer8 = IDirectSoundCaptureBuffer8;
{$EXTERNALSYM IID_IDirectSoundCaptureBuffer8}
{$ENDIF} // DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundNotify
//
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundNotify);'}
{$EXTERNALSYM IDirectSoundNotify}
IDirectSoundNotify = interface(IUnknown)
['{b0210783-89cd-11d0-af08-00a0c925cd16}']
// IDirectSoundNotify methods
function SetNotificationPositions(dwPositionNotifies: DWORD; pcPositionNotifies: PDSBPositionNotify): HResult; stdcall;
end;
IID_IDirectSoundNotify = IDirectSoundNotify;
{$EXTERNALSYM IID_IDirectSoundNotify}
//
// IKsPropertySet
//
const
KSPROPERTY_SUPPORT_GET = $00000001;
{$EXTERNALSYM KSPROPERTY_SUPPORT_GET}
KSPROPERTY_SUPPORT_SET = $00000002;
{$EXTERNALSYM KSPROPERTY_SUPPORT_SET}
type
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IKsPropertySet);'}
{$EXTERNALSYM IKsPropertySet}
IKsPropertySet = interface(IUnknown)
['{31efac30-515c-11d0-a9aa-00aa0061be93}']
// IKsPropertySet methods
function Get(const rguidPropSet: TGUID; ulId: ULONG; pInstanceData: Pointer; ulInstanceLength: ULONG; pPropertyData: Pointer; ulDataLength: ULONG; out pulBytesReturned: ULONG): HResult; stdcall;
function _Set(const rguidPropSet: TGUID; ulId: ULONG; pInstanceData: Pointer; ulInstanceLength: ULONG; pPropertyData: Pointer; ulDataLength: ULONG): HResult; stdcall;
function QuerySupport(rguidPropSet: TGUID; ulId: ULONG; out pulTypeSupport: ULONG): HResult; stdcall;
end;
IID_IKsPropertySet = IKsPropertySet;
{$EXTERNALSYM IID_IKsPropertySet}
{$IFDEF DIRECTSOUND_VERSION_8} // #if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundFXGargle
//
PDSFXGargle = ^TDSFXGargle;
_DSFXGargle = packed record
dwRateHz: DWORD; // Rate of modulation in hz
dwWaveShape: DWORD; // DSFXGARGLE_WAVE_xxx
end;
{$EXTERNALSYM _DSFXGargle}
DSFXGargle = _DSFXGargle;
{$EXTERNALSYM DSFXGargle}
TDSFXGargle = _DSFXGargle;
const
DSFXGARGLE_WAVE_TRIANGLE = 0;
{$EXTERNALSYM DSFXGARGLE_WAVE_TRIANGLE}
DSFXGARGLE_WAVE_SQUARE = 1;
{$EXTERNALSYM DSFXGARGLE_WAVE_SQUARE}
DSFXGARGLE_RATEHZ_MIN = 1;
{$EXTERNALSYM DSFXGARGLE_RATEHZ_MIN}
DSFXGARGLE_RATEHZ_MAX = 1000;
{$EXTERNALSYM DSFXGARGLE_RATEHZ_MAX}
type
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundFXGargle);'}
{$EXTERNALSYM IDirectSoundFXGargle}
IDirectSoundFXGargle = interface(IUnknown)
['{d616f352-d622-11ce-aac5-0020af0b99a3}']
// IDirectSoundFXGargle methods
function SetAllParameters(const pcDsFxGargle: TDSFXGargle): HResult; stdcall;
function GetAllParameters(out pDsFxGargle: TDSFXGargle): HResult; stdcall;
end;
IID_IDirectSoundFXGargle = IDirectSoundFXGargle;
{$EXTERNALSYM IID_IDirectSoundFXGargle}
//
// IDirectSoundFXChorus
//
PDSFXChorus = ^TDSFXChorus;
_DSFXChorus = packed record
fWetDryMix: Single;
fDepth: Single;
fFeedback: Single;
fFrequency: Single;
lWaveform: Longint; // LFO shape; DSFXCHORUS_WAVE_xxx
fDelay: Single;
lPhase: Longint;
end;
{$EXTERNALSYM _DSFXChorus}
DSFXChorus = _DSFXChorus;
{$EXTERNALSYM DSFXChorus}
TDSFXChorus = _DSFXChorus;
const
DSFXCHORUS_WAVE_TRIANGLE = 0;
{$EXTERNALSYM DSFXCHORUS_WAVE_TRIANGLE}
DSFXCHORUS_WAVE_SIN = 1;
{$EXTERNALSYM DSFXCHORUS_WAVE_SIN}
DSFXCHORUS_WETDRYMIX_MIN = 0.0;
{$EXTERNALSYM DSFXCHORUS_WETDRYMIX_MIN}
DSFXCHORUS_WETDRYMIX_MAX = 100.0;
{$EXTERNALSYM DSFXCHORUS_WETDRYMIX_MAX}
DSFXCHORUS_DEPTH_MIN = 0.0;
{$EXTERNALSYM DSFXCHORUS_DEPTH_MIN}
DSFXCHORUS_DEPTH_MAX = 100.0;
{$EXTERNALSYM DSFXCHORUS_DEPTH_MAX}
DSFXCHORUS_FEEDBACK_MIN = -99.0;
{$EXTERNALSYM DSFXCHORUS_FEEDBACK_MIN}
DSFXCHORUS_FEEDBACK_MAX = 99.0;
{$EXTERNALSYM DSFXCHORUS_FEEDBACK_MAX}
DSFXCHORUS_FREQUENCY_MIN = 0.0;
{$EXTERNALSYM DSFXCHORUS_FREQUENCY_MIN}
DSFXCHORUS_FREQUENCY_MAX = 10.0;
{$EXTERNALSYM DSFXCHORUS_FREQUENCY_MAX}
DSFXCHORUS_DELAY_MIN = 0.0;
{$EXTERNALSYM DSFXCHORUS_DELAY_MIN}
DSFXCHORUS_DELAY_MAX = 20.0;
{$EXTERNALSYM DSFXCHORUS_DELAY_MAX}
DSFXCHORUS_PHASE_MIN = 0;
{$EXTERNALSYM DSFXCHORUS_PHASE_MIN}
DSFXCHORUS_PHASE_MAX = 4;
{$EXTERNALSYM DSFXCHORUS_PHASE_MAX}
DSFXCHORUS_PHASE_NEG_180 = 0;
{$EXTERNALSYM DSFXCHORUS_PHASE_NEG_180}
DSFXCHORUS_PHASE_NEG_90 = 1;
{$EXTERNALSYM DSFXCHORUS_PHASE_NEG_90}
DSFXCHORUS_PHASE_ZERO = 2;
{$EXTERNALSYM DSFXCHORUS_PHASE_ZERO}
DSFXCHORUS_PHASE_90 = 3;
{$EXTERNALSYM DSFXCHORUS_PHASE_90}
DSFXCHORUS_PHASE_180 = 4;
{$EXTERNALSYM DSFXCHORUS_PHASE_180}
type
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundFXChorus);'}
{$EXTERNALSYM IDirectSoundFXChorus}
IDirectSoundFXChorus = interface(IUnknown)
['{880842e3-145f-43e6-a934-a71806e50547}']
// IDirectSoundFXChorus methods
function SetAllParameters(const pcDsFxChorus: TDSFXChorus): HResult; stdcall;
function GetAllParameters(out pDsFxChorus: TDSFXChorus): HResult; stdcall;
end;
IID_IDirectSoundFXChorus = IDirectSoundFXChorus;
{$EXTERNALSYM IID_IDirectSoundFXChorus}
//
// IDirectSoundFXFlanger
//
PDSFXFlanger = ^TDSFXFlanger;
_DSFXFlanger = packed record
fWetDryMix: Single;
fDepth: Single;
fFeedback: Single;
fFrequency: Single;
lWaveform: Longint;
fDelay: Single;
lPhase: Longint;
end;
{$EXTERNALSYM _DSFXFlanger}
DSFXFlanger = _DSFXFlanger;
{$EXTERNALSYM DSFXFlanger}
TDSFXFlanger = _DSFXFlanger;
const
DSFXFLANGER_WAVE_TRIANGLE = 0;
{$EXTERNALSYM DSFXFLANGER_WAVE_TRIANGLE}
DSFXFLANGER_WAVE_SIN = 1;
{$EXTERNALSYM DSFXFLANGER_WAVE_SIN}
DSFXFLANGER_WETDRYMIX_MIN = 0.0;
{$EXTERNALSYM DSFXFLANGER_WETDRYMIX_MIN}
DSFXFLANGER_WETDRYMIX_MAX = 100.0;
{$EXTERNALSYM DSFXFLANGER_WETDRYMIX_MAX}
DSFXFLANGER_FREQUENCY_MIN = 0.0;
{$EXTERNALSYM DSFXFLANGER_FREQUENCY_MIN}
DSFXFLANGER_FREQUENCY_MAX = 10.0;
{$EXTERNALSYM DSFXFLANGER_FREQUENCY_MAX}
DSFXFLANGER_DEPTH_MIN = 0.0;
{$EXTERNALSYM DSFXFLANGER_DEPTH_MIN}
DSFXFLANGER_DEPTH_MAX = 100.0;
{$EXTERNALSYM DSFXFLANGER_DEPTH_MAX}
DSFXFLANGER_PHASE_MIN = 0;
{$EXTERNALSYM DSFXFLANGER_PHASE_MIN}
DSFXFLANGER_PHASE_MAX = 4;
{$EXTERNALSYM DSFXFLANGER_PHASE_MAX}
DSFXFLANGER_FEEDBACK_MIN = -99.0;
{$EXTERNALSYM DSFXFLANGER_FEEDBACK_MIN}
DSFXFLANGER_FEEDBACK_MAX = 99.0;
{$EXTERNALSYM DSFXFLANGER_FEEDBACK_MAX}
DSFXFLANGER_DELAY_MIN = 0.0;
{$EXTERNALSYM DSFXFLANGER_DELAY_MIN}
DSFXFLANGER_DELAY_MAX = 4.0;
{$EXTERNALSYM DSFXFLANGER_DELAY_MAX}
DSFXFLANGER_PHASE_NEG_180 = 0;
{$EXTERNALSYM DSFXFLANGER_PHASE_NEG_180}
DSFXFLANGER_PHASE_NEG_90 = 1;
{$EXTERNALSYM DSFXFLANGER_PHASE_NEG_90}
DSFXFLANGER_PHASE_ZERO = 2;
{$EXTERNALSYM DSFXFLANGER_PHASE_ZERO}
DSFXFLANGER_PHASE_90 = 3;
{$EXTERNALSYM DSFXFLANGER_PHASE_90}
DSFXFLANGER_PHASE_180 = 4;
{$EXTERNALSYM DSFXFLANGER_PHASE_180}
type
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundFXFlanger);'}
{$EXTERNALSYM IDirectSoundFXFlanger}
IDirectSoundFXFlanger = interface(IUnknown)
['{903e9878-2c92-4072-9b2c-ea68f5396783}']
// IDirectSoundFXFlanger methods
function SetAllParameters(const pcDsFxFlanger: TDSFXFlanger): HResult; stdcall;
function GetAllParameters(out pDsFxFlanger: TDSFXFlanger): HResult; stdcall;
end;
IID_IDirectSoundFXFlanger = IDirectSoundFXFlanger;
{$EXTERNALSYM IID_IDirectSoundFXFlanger}
//
// IDirectSoundFXEcho
//
PDSFXEcho = ^TDSFXEcho;
_DSFXEcho = packed record
fWetDryMix: Single;
fFeedback: Single;
fLeftDelay: Single;
fRightDelay: Single;
lPanDelay: Longint;
end;
{$EXTERNALSYM _DSFXEcho}
DSFXEcho = _DSFXEcho;
{$EXTERNALSYM DSFXEcho}
TDSFXEcho = _DSFXEcho;
const
DSFXECHO_WETDRYMIX_MIN = 0.0;
{$EXTERNALSYM DSFXECHO_WETDRYMIX_MIN}
DSFXECHO_WETDRYMIX_MAX = 100.0;
{$EXTERNALSYM DSFXECHO_WETDRYMIX_MAX}
DSFXECHO_FEEDBACK_MIN = 0.0;
{$EXTERNALSYM DSFXECHO_FEEDBACK_MIN}
DSFXECHO_FEEDBACK_MAX = 100.0;
{$EXTERNALSYM DSFXECHO_FEEDBACK_MAX}
DSFXECHO_LEFTDELAY_MIN = 1.0;
{$EXTERNALSYM DSFXECHO_LEFTDELAY_MIN}
DSFXECHO_LEFTDELAY_MAX = 2000.0;
{$EXTERNALSYM DSFXECHO_LEFTDELAY_MAX}
DSFXECHO_RIGHTDELAY_MIN = 1.0;
{$EXTERNALSYM DSFXECHO_RIGHTDELAY_MIN}
DSFXECHO_RIGHTDELAY_MAX = 2000.0;
{$EXTERNALSYM DSFXECHO_RIGHTDELAY_MAX}
DSFXECHO_PANDELAY_MIN = 0;
{$EXTERNALSYM DSFXECHO_PANDELAY_MIN}
DSFXECHO_PANDELAY_MAX = 1;
{$EXTERNALSYM DSFXECHO_PANDELAY_MAX}
type
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectSoundFXEcho);'}
{$EXTERNALSYM IDirectSoundFXEcho}
IDirectSoundFXEcho = interface(IUnknown)
['{8bd28edf-50db-4e92-a2bd-445488d1ed42}']