-
Notifications
You must be signed in to change notification settings - Fork 44
/
MSACM.pas
1409 lines (1264 loc) · 51.3 KB
/
MSACM.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
{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ Microsoft Audio Compression Manager interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: msacm.h, released 9 March 1999. }
{ The original Pascal code is: MSAcm.pas, released 21 July 1999. }
{ The initial developer of the Pascal code is Francois Piette }
{ [email protected], http://www.rtfm.be/fpiette/indexuk.htm }
{ rue de Grady 24, 4053 Embourg, Belgium }
{ }
{ Portions created by Francois Piette are }
{ Copyright (C) 1999 Francois Piette. }
{ }
{ Contributor(s): Marcel van Brakel ([email protected]) }
{ }
{ Obtained through: }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ 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/NPL/NPL-1_1Final.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. }
{ }
{******************************************************************}
unit MSAcm;
interface
{$HPPEMIT ''}
{$HPPEMIT '#include "MSAcm.h"'}
{$HPPEMIT ''}
uses
Windows, MMSystem;
type
PWaveFilter = ^TWaveFilter;
// Defined in mmreg.h
WAVEFILTER = packed record
cbStruct: DWORD; // Size of the filter in bytes
dwFilterTag: DWORD; // filter type
fdwFilter: DWORD; // Flags for the filter (Universal Dfns)
dwReserved: array [0..4] of DWORD; // Reserved for system use
end;
TWaveFilter = WAVEFILTER;
const
DRV_MAPPER_PREFERRED_INPUT_GET = DRV_USER + 0;
{$EXTERNALSYM DRV_MAPPER_PREFERRED_INPUT_GET}
DRV_MAPPER_PREFERRED_OUTPUT_GET = DRV_USER + 2;
{$EXTERNALSYM DRV_MAPPER_PREFERRED_OUTPUT_GET}
DRVM_MAPPER_STATUS = $2000;
{$EXTERNALSYM DRVM_MAPPER_STATUS}
WIDM_MAPPER_STATUS = DRVM_MAPPER_STATUS + 0;
{$EXTERNALSYM WIDM_MAPPER_STATUS}
WAVEIN_MAPPER_STATUS_DEVICE = 0;
{$EXTERNALSYM WAVEIN_MAPPER_STATUS_DEVICE}
WAVEIN_MAPPER_STATUS_MAPPED = 1;
{$EXTERNALSYM WAVEIN_MAPPER_STATUS_MAPPED}
WAVEIN_MAPPER_STATUS_FORMAT = 2;
{$EXTERNALSYM WAVEIN_MAPPER_STATUS_FORMAT}
WODM_MAPPER_STATUS = DRVM_MAPPER_STATUS + 0;
{$EXTERNALSYM WODM_MAPPER_STATUS}
WAVEOUT_MAPPER_STATUS_DEVICE = 0;
{$EXTERNALSYM WAVEOUT_MAPPER_STATUS_DEVICE}
WAVEOUT_MAPPER_STATUS_MAPPED = 1;
{$EXTERNALSYM WAVEOUT_MAPPER_STATUS_MAPPED}
WAVEOUT_MAPPER_STATUS_FORMAT = 2;
{$EXTERNALSYM WAVEOUT_MAPPER_STATUS_FORMAT}
//--------------------------------------------------------------------------
//
// ACM General API's and Defines
//
//--------------------------------------------------------------------------
// there are four types of 'handles' used by the ACM. the first three
// are unique types that define specific objects:
//
// HACMDRIVERID: used to _identify_ an ACM driver. this identifier can be
// used to _open_ the driver for querying details, etc about the driver.
//
// HACMDRIVER: used to manage a driver (codec, filter, etc). this handle
// is much like a handle to other media drivers--you use it to send
// messages to the converter, query for capabilities, etc.
//
// HACMSTREAM: used to manage a 'stream' (conversion channel) with the
// ACM. you use a stream handle to convert data from one format/type
// to another--much like dealing with a file handle.
//
//
// the fourth handle type is a generic type used on ACM functions that
// can accept two or more of the above handle types (for example the
// acmMetrics and acmDriverID functions).
//
// HACMOBJ: used to identify ACM objects. this handle is used on functions
// that can accept two or more ACM handle types.
type
HACMDRIVERID__ = record
Unused: Integer;
end;
{$EXTERNALSYM HACMDRIVERID__}
HACMDRIVERID = ^HACMDRIVERID__;
{$EXTERNALSYM HACMDRIVERID}
PHACMDRIVERID = ^HACMDRIVERID;
{$EXTERNALSYM PHACMDRIVERID}
LPHACMDRIVERID = ^HACMDRIVERID;
{$EXTERNALSYM LPHACMDRIVERID}
HACMDRIVER__ = record
Unused: Integer;
end;
{$EXTERNALSYM HACMDRIVER__}
HACMDRIVER = ^HACMDRIVER__;
{$EXTERNALSYM HACMDRIVER}
PHACMDRIVER = ^HACMDRIVER;
{$EXTERNALSYM PHACMDRIVER}
LPHACMDRIVER = ^HACMDRIVER;
{$EXTERNALSYM LPHACMDRIVER}
HACMSTREAM__ = record
Unused: Integer;
end;
{$EXTERNALSYM HACMSTREAM__}
HACMSTREAM = ^HACMSTREAM__;
{$EXTERNALSYM HACMSTREAM}
PHACMSTREAM = ^HACMSTREAM;
{$EXTERNALSYM PHACMSTREAM}
LPHACMSTREAM = ^HACMSTREAM;
{$EXTERNALSYM LPHACMSTREAM}
HACMOBJ__ = record
Unused: Integer;
end;
{$EXTERNALSYM HACMOBJ__}
HACMOBJ = ^HACMOBJ__;
{$EXTERNALSYM HACMOBJ}
PHACMOBJ = ^HACMOBJ;
{$EXTERNALSYM PHACMOBJ}
LPHACMOBJ = ^HACMOBJ;
{$EXTERNALSYM LPHACMOBJ}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// ACM Error Codes
//
// Note that these error codes are specific errors that apply to the ACM
// directly--general errors are defined as MMSYSERR_*.
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
type
MMRESULT = UINT;
{$EXTERNALSYM MMRESULT}
const
ACMERR_BASE = 512;
{$EXTERNALSYM ACMERR_BASE}
ACMERR_NOTPOSSIBLE = (ACMERR_BASE + 0);
{$EXTERNALSYM ACMERR_NOTPOSSIBLE}
ACMERR_BUSY = (ACMERR_BASE + 1);
{$EXTERNALSYM ACMERR_BUSY}
ACMERR_UNPREPARED = (ACMERR_BASE + 2);
{$EXTERNALSYM ACMERR_UNPREPARED}
ACMERR_CANCELED = (ACMERR_BASE + 3);
{$EXTERNALSYM ACMERR_CANCELED}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// ACM Window Messages
//
// These window messages are sent by the ACM or ACM drivers to notify
// applications of events.
//
// Note that these window message numbers will also be defined in
// mmsystem.
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const
MM_ACM_OPEN = MM_STREAM_OPEN; // conversion callback messages
{$EXTERNALSYM MM_ACM_OPEN}
MM_ACM_CLOSE = MM_STREAM_CLOSE;
{$EXTERNALSYM MM_ACM_CLOSE}
MM_ACM_DONE = MM_STREAM_DONE;
{$EXTERNALSYM MM_ACM_DONE}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// acmGetVersion()
//
// the ACM version is a 32 bit number that is broken into three parts as
// follows:
//
// bits 24 - 31: 8 bit _major_ version number
// bits 16 - 23: 8 bit _minor_ version number
// bits 0 - 15: 16 bit build number
//
// this is then displayed as follows:
//
// bMajor = (BYTE)(dwVersion >> 24)
// bMinor = (BYTE)(dwVersion >> 16) &
// wBuild = LOWORD(dwVersion)
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function acmGetVersion: DWORD; stdcall;
{$EXTERNALSYM acmGetVersion}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmMetrics()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmMetrics(hao: HACMOBJ; uMetric: UINT; var pMetric): MMRESULT; stdcall;
{$EXTERNALSYM acmMetrics}
const
ACM_METRIC_COUNT_DRIVERS = 1;
{$EXTERNALSYM ACM_METRIC_COUNT_DRIVERS}
ACM_METRIC_COUNT_CODECS = 2;
{$EXTERNALSYM ACM_METRIC_COUNT_CODECS}
ACM_METRIC_COUNT_CONVERTERS = 3;
{$EXTERNALSYM ACM_METRIC_COUNT_CONVERTERS}
ACM_METRIC_COUNT_FILTERS = 4;
{$EXTERNALSYM ACM_METRIC_COUNT_FILTERS}
ACM_METRIC_COUNT_DISABLED = 5;
{$EXTERNALSYM ACM_METRIC_COUNT_DISABLED}
ACM_METRIC_COUNT_HARDWARE = 6;
{$EXTERNALSYM ACM_METRIC_COUNT_HARDWARE}
ACM_METRIC_COUNT_LOCAL_DRIVERS = 20;
{$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_DRIVERS}
ACM_METRIC_COUNT_LOCAL_CODECS = 21;
{$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_CODECS}
ACM_METRIC_COUNT_LOCAL_CONVERTERS = 22;
{$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_CONVERTERS}
ACM_METRIC_COUNT_LOCAL_FILTERS = 23;
{$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_FILTERS}
ACM_METRIC_COUNT_LOCAL_DISABLED = 24;
{$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_DISABLED}
ACM_METRIC_HARDWARE_WAVE_INPUT = 30;
{$EXTERNALSYM ACM_METRIC_HARDWARE_WAVE_INPUT}
ACM_METRIC_HARDWARE_WAVE_OUTPUT = 31;
{$EXTERNALSYM ACM_METRIC_HARDWARE_WAVE_OUTPUT}
ACM_METRIC_MAX_SIZE_FORMAT = 50;
{$EXTERNALSYM ACM_METRIC_MAX_SIZE_FORMAT}
ACM_METRIC_MAX_SIZE_FILTER = 51;
{$EXTERNALSYM ACM_METRIC_MAX_SIZE_FILTER}
ACM_METRIC_DRIVER_SUPPORT = 100;
{$EXTERNALSYM ACM_METRIC_DRIVER_SUPPORT}
ACM_METRIC_DRIVER_PRIORITY = 101;
{$EXTERNALSYM ACM_METRIC_DRIVER_PRIORITY}
//--------------------------------------------------------------------------;
//
// ACM Drivers
//
//--------------------------------------------------------------------------;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverEnum()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
type
ACMDRIVERENUMCB = function (hadif: HACMDRIVERID; dwInstance, fdwSupport: DWORD): BOOL; stdcall;
{$EXTERNALSYM ACMDRIVERENUMCB}
function acmDriverEnum(fnCallback: ACMDRIVERENUMCB; dwInstance: DWORD;
fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverEnum}
const
ACM_DRIVERENUMF_NOLOCAL = $40000000;
{$EXTERNALSYM ACM_DRIVERENUMF_NOLOCAL}
ACM_DRIVERENUMF_DISABLED = $80000000;
{$EXTERNALSYM ACM_DRIVERENUMF_DISABLED}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverID()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmDriverID(hao: HACMOBJ; var phadid: HACMDRIVERID; fdwDriverID: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverID}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverAdd()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmDriverAddA(var phadid: HACMDRIVERID; hinstModule: HINST; Param: LPARAM;
dwPriority: DWORD; fdwAdd: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverAddA}
function acmDriverAddW(var phadid: HACMDRIVERID; hinstModule: HINST; Param: LPARAM;
dwPriority: DWORD; fdwAdd: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverAddW}
function acmDriverAdd(var phadid: HACMDRIVERID; hinstModule: HINST; Param: LPARAM;
dwPriority: DWORD; fdwAdd: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverAdd}
const
ACM_DRIVERADDF_FUNCTION = $00000003; // lParam is a procedure
{$EXTERNALSYM ACM_DRIVERADDF_FUNCTION}
ACM_DRIVERADDF_NOTIFYHWND = $00000004; // lParam is notify hwnd
{$EXTERNALSYM ACM_DRIVERADDF_NOTIFYHWND}
ACM_DRIVERADDF_TYPEMASK = $00000007; // driver type mask
{$EXTERNALSYM ACM_DRIVERADDF_TYPEMASK}
ACM_DRIVERADDF_LOCAL = $00000000; // is local to current task
{$EXTERNALSYM ACM_DRIVERADDF_LOCAL}
ACM_DRIVERADDF_GLOBAL = $00000008; // is global
{$EXTERNALSYM ACM_DRIVERADDF_GLOBAL}
//
// prototype for ACM driver procedures that are installed as _functions_
// or _notifations_ instead of as a standalone installable driver.
//
type
ACMDRIVERPROC = function (dwID: DWORD; hdrvr: HACMDRIVERID; uMsg: UINT;
lParam1: LPARAM; lParam2: LPARAM) : LRESULT; stdcall;
{$EXTERNALSYM ACMDRIVERPROC}
LPACMDRIVERPROC = ^ACMDRIVERPROC;
{$EXTERNALSYM LPACMDRIVERPROC}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverRemove()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmDriverRemove(hadid: HACMDRIVERID; fdwRemove: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverRemove}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverOpen()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmDriverOpen(var phad: HACMDRIVER; hadid: HACMDRIVERID; fdwOpen: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverOpen}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverClose()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmDriverClose(had: HACMDRIVER; fdwClose: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverClose}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverMessage()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmDriverMessage(had: HACMDRIVER; uMsg: UINT; Param1, Param2: LPARAM): LRESULT; stdcall;
{$EXTERNALSYM acmDriverMessage}
const
ACMDM_USER = DRV_USER + $0000;
{$EXTERNALSYM ACMDM_USER}
ACMDM_RESERVED_LOW = DRV_USER + $2000;
{$EXTERNALSYM ACMDM_RESERVED_LOW}
ACMDM_RESERVED_HIGH = DRV_USER + $2FFF;
{$EXTERNALSYM ACMDM_RESERVED_HIGH}
ACMDM_BASE = ACMDM_RESERVED_LOW;
{$EXTERNALSYM ACMDM_BASE}
ACMDM_DRIVER_ABOUT = ACMDM_BASE + 11;
{$EXTERNALSYM ACMDM_DRIVER_ABOUT}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverPriority
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmDriverPriority(hadid: HACMDRIVERID; dwPriority, fdwPriority: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverPriority}
const
ACM_DRIVERPRIORITYF_ENABLE = $00000001;
{$EXTERNALSYM ACM_DRIVERPRIORITYF_ENABLE}
ACM_DRIVERPRIORITYF_DISABLE = $00000002;
{$EXTERNALSYM ACM_DRIVERPRIORITYF_DISABLE}
ACM_DRIVERPRIORITYF_ABLEMASK = $00000003;
{$EXTERNALSYM ACM_DRIVERPRIORITYF_ABLEMASK}
ACM_DRIVERPRIORITYF_BEGIN = $00010000;
{$EXTERNALSYM ACM_DRIVERPRIORITYF_BEGIN}
ACM_DRIVERPRIORITYF_END = $00020000;
{$EXTERNALSYM ACM_DRIVERPRIORITYF_END}
ACM_DRIVERPRIORITYF_DEFERMASK = $00030000;
{$EXTERNALSYM ACM_DRIVERPRIORITYF_DEFERMASK}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverDetails()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// ACMDRIVERDETAILS
//
// the ACMDRIVERDETAILS structure is used to get various capabilities from
// an ACM driver (codec, converter, filter).
//
const
ACMDRIVERDETAILS_SHORTNAME_CHARS = 32;
{$EXTERNALSYM ACMDRIVERDETAILS_SHORTNAME_CHARS}
ACMDRIVERDETAILS_LONGNAME_CHARS = 128;
{$EXTERNALSYM ACMDRIVERDETAILS_LONGNAME_CHARS}
ACMDRIVERDETAILS_COPYRIGHT_CHARS = 80;
{$EXTERNALSYM ACMDRIVERDETAILS_COPYRIGHT_CHARS}
ACMDRIVERDETAILS_LICENSING_CHARS = 128;
{$EXTERNALSYM ACMDRIVERDETAILS_LICENSING_CHARS}
ACMDRIVERDETAILS_FEATURES_CHARS = 512;
{$EXTERNALSYM ACMDRIVERDETAILS_FEATURES_CHARS}
type
PAcmDriverDetailsA = ^TAcmDriverDetailsA;
PAcmDriverDetailsW = ^TAcmDriverDetailsW;
PAcmDriverDetails = PAcmDriverDetailsA;
_ACMDRIVERDETAILSA = packed record
cbStruct: DWORD;
fccType: FOURCC;
fccComp: FOURCC;
wMid: Word;
wPid: Word;
vdwACM: DWORD;
vdwDriver: DWORD;
fdwSupport: DWORD;
cFormatTags: DWORD;
cFilterTags: DWORD;
hicon: HICON;
szShortName: array [0..ACMDRIVERDETAILS_SHORTNAME_CHARS - 1] of AnsiChar;
szLongName: array [0..ACMDRIVERDETAILS_LONGNAME_CHARS - 1] of AnsiChar;
szCopyright: array [0..ACMDRIVERDETAILS_COPYRIGHT_CHARS - 1] of AnsiChar;
szLicensing: array [0..ACMDRIVERDETAILS_LICENSING_CHARS - 1] of AnsiChar;
szFeatures: array [0..ACMDRIVERDETAILS_FEATURES_CHARS - 1] of AnsiChar;
end;
{$EXTERNALSYM _ACMDRIVERDETAILSA}
_ACMDRIVERDETAILSW = packed record
cbStruct: DWORD;
fccType: FOURCC;
fccComp: FOURCC;
wMid: Word;
wPid: Word;
vdwACM: DWORD;
vdwDriver: DWORD;
fdwSupport: DWORD;
cFormatTags: DWORD;
cFilterTags: DWORD;
hicon: HICON;
szShortName: array [0..ACMDRIVERDETAILS_SHORTNAME_CHARS - 1] of WideChar;
szLongName: array [0..ACMDRIVERDETAILS_LONGNAME_CHARS - 1] of WideChar;
szCopyright: array [0..ACMDRIVERDETAILS_COPYRIGHT_CHARS - 1] of WideChar;
szLicensing: array [0..ACMDRIVERDETAILS_LICENSING_CHARS - 1] of WideChar;
szFeatures: array [0..ACMDRIVERDETAILS_FEATURES_CHARS - 1] of WideChar;
end;
{$EXTERNALSYM _ACMDRIVERDETAILSW}
_ACMDRIVERDETAILS = _ACMDRIVERDETAILSA;
TAcmDriverDetailsA = _ACMDRIVERDETAILSA;
TAcmDriverDetailsW = _ACMDRIVERDETAILSW;
TAcmDriverDetails = TAcmDriverDetailsA;
//
// ACMDRIVERDETAILS.fccType
//
// ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC: the FOURCC used in the fccType
// field of the ACMDRIVERDETAILS structure to specify that this is an ACM
// codec designed for audio.
//
//
// ACMDRIVERDETAILS.fccComp
//
// ACMDRIVERDETAILS_FCCCOMP_UNDEFINED: the FOURCC used in the fccComp
// field of the ACMDRIVERDETAILS structure. this is currently an unused
// field.
//
const
ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC = $63647561; // 'audc';
{$EXTERNALSYM ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC}
ACMDRIVERDETAILS_FCCCOMP_UNDEFINED = 0; // '0000';
{$EXTERNALSYM ACMDRIVERDETAILS_FCCCOMP_UNDEFINED}
//
// the following flags are used to specify the type of conversion(s) that
// the converter/codec/filter supports. these are placed in the fdwSupport
// field of the ACMDRIVERDETAILS structure. note that a converter can
// support one or more of these flags in any combination.
//
// ACMDRIVERDETAILS_SUPPORTF_CODEC: this flag is set if the driver supports
// conversions from one format tag to another format tag. for example, if a
// converter compresses WAVE_FORMAT_PCM to WAVE_FORMAT_ADPCM, then this bit
// should be set.
//
// ACMDRIVERDETAILS_SUPPORTF_CONVERTER: this flags is set if the driver
// supports conversions on the same format tag. as an example, the PCM
// converter that is built into the ACM sets this bit (and only this bit)
// because it converts only PCM formats (bits, sample rate).
//
// ACMDRIVERDETAILS_SUPPORTF_FILTER: this flag is set if the driver supports
// transformations on a single format. for example, a converter that changed
// the 'volume' of PCM data would set this bit. 'echo' and 'reverb' are
// also filter types.
//
// ACMDRIVERDETAILS_SUPPORTF_HARDWARE: this flag is set if the driver supports
// hardware input and/or output through a waveform device.
//
// ACMDRIVERDETAILS_SUPPORTF_ASYNC: this flag is set if the driver supports
// async conversions.
//
//
// ACMDRIVERDETAILS_SUPPORTF_LOCAL: this flag is set _by the ACM_ if a
// driver has been installed local to the current task. this flag is also
// set in the fdwSupport argument to the enumeration callback function
// for drivers.
//
// ACMDRIVERDETAILS_SUPPORTF_DISABLED: this flag is set _by the ACM_ if a
// driver has been disabled. this flag is also passed set in the fdwSupport
// argument to the enumeration callback function for drivers.
//
const
ACMDRIVERDETAILS_SUPPORTF_CODEC = $00000001;
{$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_CODEC}
ACMDRIVERDETAILS_SUPPORTF_CONVERTER = $00000002;
{$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_CONVERTER}
ACMDRIVERDETAILS_SUPPORTF_FILTER = $00000004;
{$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_FILTER}
ACMDRIVERDETAILS_SUPPORTF_HARDWARE = $00000008;
{$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_HARDWARE}
ACMDRIVERDETAILS_SUPPORTF_ASYNC = $00000010;
{$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_ASYNC}
ACMDRIVERDETAILS_SUPPORTF_LOCAL = $40000000;
{$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_LOCAL}
ACMDRIVERDETAILS_SUPPORTF_DISABLED = $80000000;
{$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_DISABLED}
function acmDriverDetailsA(hadid: HACMDRIVERID; var padd: TAcmDriverDetailsA;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverDetailsA}
function acmDriverDetailsW(hadid: HACMDRIVERID; var padd: TAcmDriverDetailsW;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverDetailsW}
function acmDriverDetails(hadid: HACMDRIVERID; var padd: TAcmDriverDetails;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmDriverDetails}
//--------------------------------------------------------------------------;
//
// ACM Format Tags
//
//--------------------------------------------------------------------------;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFormatTagDetails()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
const
ACMFORMATTAGDETAILS_FORMATTAG_CHARS = 48;
{$EXTERNALSYM ACMFORMATTAGDETAILS_FORMATTAG_CHARS}
type
PAcmFormatTagDetailsA = ^TAcmFormatTagDetailsA;
PAcmFormatTagDetailsW = ^TAcmFormatTagDetailsW;
PAcmFormatTagDetails = PAcmFormatTagDetailsA;
_ACMFORMATTAGDETAILSA = packed record
cbStruct: DWORD;
dwFormatTagIndex: DWORD;
dwFormatTag: DWORD;
cbFormatSize: DWORD;
fdwSupport: DWORD;
cStandardFormats: DWORD;
szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS - 1] of AnsiChar;
end;
{$EXTERNALSYM _ACMFORMATTAGDETAILSA}
_ACMFORMATTAGDETAILSW = packed record
cbStruct: DWORD;
dwFormatTagIndex: DWORD;
dwFormatTag: DWORD;
cbFormatSize: DWORD;
fdwSupport: DWORD;
cStandardFormats: DWORD;
szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS - 1] of WideChar;
end;
{$EXTERNALSYM _ACMFORMATTAGDETAILSW}
_ACMFORMATTAGDETAILS = _ACMFORMATTAGDETAILSA;
TAcmFormatTagDetailsA = _ACMFORMATTAGDETAILSA;
TAcmFormatTagDetailsW = _ACMFORMATTAGDETAILSW;
TAcmFormatTagDetails = TAcmFormatTagDetailsA;
function acmFormatTagDetailsA(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsA;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatTagDetailsA}
function acmFormatTagDetailsW(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsW;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatTagDetailsW}
function acmFormatTagDetails(had: HACMDRIVER; var paftd: TAcmFormatTagDetails;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatTagDetails}
const
ACM_FORMATTAGDETAILSF_INDEX = $00000000;
{$EXTERNALSYM ACM_FORMATTAGDETAILSF_INDEX}
ACM_FORMATTAGDETAILSF_FORMATTAG = $00000001;
{$EXTERNALSYM ACM_FORMATTAGDETAILSF_FORMATTAG}
ACM_FORMATTAGDETAILSF_LARGESTSIZE = $00000002;
{$EXTERNALSYM ACM_FORMATTAGDETAILSF_LARGESTSIZE}
ACM_FORMATTAGDETAILSF_QUERYMASK = $0000000F;
{$EXTERNALSYM ACM_FORMATTAGDETAILSF_QUERYMASK}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFormatTagEnum()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
type
ACMFORMATTAGENUMCBA = function (hadid: HACMDRIVERID; paftd: PAcmFormatTagDetailsA;
dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
{$EXTERNALSYM ACMFORMATTAGENUMCBA}
ACMFORMATTAGENUMCBW = function (hadid: HACMDRIVERID; paftd: PAcmFormatTagDetailsW;
dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
{$EXTERNALSYM ACMFORMATTAGENUMCBW}
ACMFORMATTAGENUMCB = ACMFORMATTAGENUMCBA;
function acmFormatTagEnumA(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsA;
fnCallback: ACMFORMATTAGENUMCBA; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatTagEnumA}
function acmFormatTagEnumW(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsW;
fnCallback: ACMFORMATTAGENUMCBW; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatTagEnumW}
function acmFormatTagEnum(had: HACMDRIVER; var paftd: TAcmFormatTagDetails;
fnCallback: ACMFORMATTAGENUMCB; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatTagEnum}
//--------------------------------------------------------------------------;
//
// ACM Formats
//
//--------------------------------------------------------------------------;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFormatDetails()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
const
ACMFORMATDETAILS_FORMAT_CHARS = 128;
{$EXTERNALSYM ACMFORMATDETAILS_FORMAT_CHARS}
type
PAcmFormatDetailsA = ^TAcmFormatDetailsA;
PAcmFormatDetailsW = ^TAcmFormatDetailsW;
PAcmFormatDetails = PAcmFormatDetailsA;
_ACMFORMATDETAILSA = packed record
cbStruct: DWORD;
dwFormatIndex: DWORD;
dwFormatTag: DWORD;
fdwSupport: DWORD;
pwfx: PWAVEFORMATEX;
cbwfx: DWORD;
szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS - 1] of AnsiChar;
end;
{$EXTERNALSYM _ACMFORMATDETAILSA}
_ACMFORMATDETAILSW = packed record
cbStruct: DWORD;
dwFormatIndex: DWORD;
dwFormatTag: DWORD;
fdwSupport: DWORD;
pwfx: PWAVEFORMATEX;
cbwfx: DWORD;
szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS - 1] of WideChar;
end;
{$EXTERNALSYM _ACMFORMATDETAILSW}
_ACMFORMATDETAILS = _ACMFORMATDETAILSA;
TAcmFormatDetailsA = _ACMFORMATDETAILSA;
TAcmFormatDetailsW = _ACMFORMATDETAILSW;
TAcmFormatDetails = TAcmFormatDetailsA;
function acmFormatDetailsA(had: HACMDRIVER; var pafd: TAcmFormatDetailsA;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatDetailsA}
function acmFormatDetailsW(had: HACMDRIVER; var pafd: TAcmFormatDetailsW;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatDetailsW}
function acmFormatDetails(had: HACMDRIVER; var pafd: TAcmFormatDetails;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatDetails}
const
ACM_FORMATDETAILSF_INDEX = $00000000;
{$EXTERNALSYM ACM_FORMATDETAILSF_INDEX}
ACM_FORMATDETAILSF_FORMAT = $00000001;
{$EXTERNALSYM ACM_FORMATDETAILSF_FORMAT}
ACM_FORMATDETAILSF_QUERYMASK = $0000000F;
{$EXTERNALSYM ACM_FORMATDETAILSF_QUERYMASK}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFormatEnum()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
type
ACMFORMATENUMCBA = function (hadid:HACMDRIVERID; pafd: PAcmFormatDetailsA;
dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
{$EXTERNALSYM ACMFORMATENUMCBA}
ACMFORMATENUMCBW = function (hadid:HACMDRIVERID; pafd: PAcmFormatDetailsW;
dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
{$EXTERNALSYM ACMFORMATENUMCBW}
ACMFORMATENUMCB = ACMFORMATENUMCBA;
function acmFormatEnumA(had: HACMDRIVER; var pafd: TAcmFormatDetailsA;
fnCallback: ACMFORMATENUMCBA; dwInstance, fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatEnumA}
function acmFormatEnumW(had: HACMDRIVER; var pafd: TAcmFormatDetailsW;
fnCallback: ACMFORMATENUMCBW; dwInstance, fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatEnumW}
function acmFormatEnum(had: HACMDRIVER; var pafd: TAcmFormatDetails;
fnCallback: ACMFORMATENUMCB; dwInstance, fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatEnum}
const
ACM_FORMATENUMF_WFORMATTAG = $00010000;
{$EXTERNALSYM ACM_FORMATENUMF_WFORMATTAG}
ACM_FORMATENUMF_NCHANNELS = $00020000;
{$EXTERNALSYM ACM_FORMATENUMF_NCHANNELS}
ACM_FORMATENUMF_NSAMPLESPERSEC = $00040000;
{$EXTERNALSYM ACM_FORMATENUMF_NSAMPLESPERSEC}
ACM_FORMATENUMF_WBITSPERSAMPLE = $00080000;
{$EXTERNALSYM ACM_FORMATENUMF_WBITSPERSAMPLE}
ACM_FORMATENUMF_CONVERT = $00100000;
{$EXTERNALSYM ACM_FORMATENUMF_CONVERT}
ACM_FORMATENUMF_SUGGEST = $00200000;
{$EXTERNALSYM ACM_FORMATENUMF_SUGGEST}
ACM_FORMATENUMF_HARDWARE = $00400000;
{$EXTERNALSYM ACM_FORMATENUMF_HARDWARE}
ACM_FORMATENUMF_INPUT = $00800000;
{$EXTERNALSYM ACM_FORMATENUMF_INPUT}
ACM_FORMATENUMF_OUTPUT = $01000000;
{$EXTERNALSYM ACM_FORMATENUMF_OUTPUT}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFormatSuggest()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
function acmFormatSuggest(had: HACMDRIVER; var pwfxSrc: TWAVEFORMATEX;
var pwfxDst: TWAVEFORMATEX; cbwfxDst: DWORD; fdwSuggest: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatSuggest}
const
ACM_FORMATSUGGESTF_WFORMATTAG = $00010000;
{$EXTERNALSYM ACM_FORMATSUGGESTF_WFORMATTAG}
ACM_FORMATSUGGESTF_NCHANNELS = $00020000;
{$EXTERNALSYM ACM_FORMATSUGGESTF_NCHANNELS}
ACM_FORMATSUGGESTF_NSAMPLESPERSEC = $00040000;
{$EXTERNALSYM ACM_FORMATSUGGESTF_NSAMPLESPERSEC}
ACM_FORMATSUGGESTF_WBITSPERSAMPLE = $00080000;
{$EXTERNALSYM ACM_FORMATSUGGESTF_WBITSPERSAMPLE}
ACM_FORMATSUGGESTF_TYPEMASK = $00FF0000;
{$EXTERNALSYM ACM_FORMATSUGGESTF_TYPEMASK}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFormatChoose()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
const
ACMHELPMSGSTRINGA = 'acmchoose_help';
{$EXTERNALSYM ACMHELPMSGSTRINGA}
ACMHELPMSGSTRINGW = 'acmchoose_help';
{$EXTERNALSYM ACMHELPMSGSTRINGW}
ACMHELPMSGSTRING = ACMHELPMSGSTRINGA;
ACMHELPMSGCONTEXTMENUA = 'acmchoose_contextmenu';
{$EXTERNALSYM ACMHELPMSGCONTEXTMENUA}
ACMHELPMSGCONTEXTMENUW = 'acmchoose_contextmenu';
{$EXTERNALSYM ACMHELPMSGCONTEXTMENUW}
ACMHELPMSGCONTEXTMENU = ACMHELPMSGCONTEXTMENUA;
ACMHELPMSGCONTEXTHELPA = 'acmchoose_contexthelp';
{$EXTERNALSYM ACMHELPMSGCONTEXTHELPA}
ACMHELPMSGCONTEXTHELPW = 'acmchoose_contexthelp';
{$EXTERNALSYM ACMHELPMSGCONTEXTHELPW}
ACMHELPMSGCONTEXTHELP = ACMHELPMSGCONTEXTHELPA;
//
// MM_ACM_FORMATCHOOSE is sent to hook callbacks by the Format Chooser
// Dialog...
//
const
MM_ACM_FORMATCHOOSE = $8000;
{$EXTERNALSYM MM_ACM_FORMATCHOOSE}
FORMATCHOOSE_MESSAGE = 0;
{$EXTERNALSYM FORMATCHOOSE_MESSAGE}
FORMATCHOOSE_FORMATTAG_VERIFY = FORMATCHOOSE_MESSAGE + 0;
{$EXTERNALSYM FORMATCHOOSE_FORMATTAG_VERIFY}
FORMATCHOOSE_FORMAT_VERIFY = FORMATCHOOSE_MESSAGE + 1;
{$EXTERNALSYM FORMATCHOOSE_FORMAT_VERIFY}
FORMATCHOOSE_CUSTOM_VERIFY = FORMATCHOOSE_MESSAGE + 2;
{$EXTERNALSYM FORMATCHOOSE_CUSTOM_VERIFY}
type
ACMFORMATCHOOSEHOOKPROCA = function (hwnd: HWND; uMsg: UINT; wParam: WPARAM;
lParam: LPARAM): UINT; stdcall;
{$EXTERNALSYM ACMFORMATCHOOSEHOOKPROCA}
ACMFORMATCHOOSEHOOKPROCW = function (hwnd: HWND; uMsg: UINT; wParam: WPARAM;
lParam: LPARAM): UINT; stdcall;
{$EXTERNALSYM ACMFORMATCHOOSEHOOKPROCW}
ACMFORMATCHOOSEHOOKPROC = ACMFORMATCHOOSEHOOKPROCA;
PAcmFormatChooseA = ^TAcmFormatChooseA;
PAcmFormatChooseW = ^TAcmFormatChooseW;
PAcmFormatChoose = PAcmFormatChooseA;
_ACMFORMATCHOOSEA = packed record
cbStruct: DWORD;
fdwStyle: DWORD;
hwndOwner: HWND;
pwfx: PWAVEFORMATEX;
cbwfx: DWORD;
pszTitle: PAnsiChar;
szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS-1] of AnsiChar;
szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS-1] of AnsiChar;
pszName: PAnsiChar;
cchName: DWORD;
fdwEnum: DWORD;
pwfxEnum: PWAVEFORMATEX;
hInstance: HINST;
pszTemplateName: PAnsiChar;
lCustData: LPARAM;
pfnHook: ACMFORMATCHOOSEHOOKPROCA;
end;
{$EXTERNALSYM _ACMFORMATCHOOSEA}
_ACMFORMATCHOOSEW = packed record
cbStruct: DWORD;
fdwStyle: DWORD;
hwndOwner: HWND;
pwfx: PWAVEFORMATEX;
cbwfx: DWORD;
pszTitle: PWideChar;
szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS-1] of WideChar;
szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS-1] of WideChar;
pszName: PWideChar;
cchName: DWORD;
fdwEnum: DWORD;
pwfxEnum: PWAVEFORMATEX;
hInstance: HINST;
pszTemplateName: PWideChar;
lCustData: LPARAM;
pfnHook: ACMFORMATCHOOSEHOOKPROCW;
end;
{$EXTERNALSYM _ACMFORMATCHOOSEW}
_ACMFORMATCHOOSE = _ACMFORMATCHOOSEA;
TAcmFormatChooseA = _ACMFORMATCHOOSEA;
TAcmFormatChooseW = _ACMFORMATCHOOSEW;
TAcmFormatChoose = TAcmFormatChooseA;
//
// ACMFORMATCHOOSE.fdwStyle
//
const
ACMFORMATCHOOSE_STYLEF_SHOWHELP = $00000004;
{$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_SHOWHELP}
ACMFORMATCHOOSE_STYLEF_ENABLEHOOK = $00000008;
{$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_ENABLEHOOK}
ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE = $00000010;
{$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE}
ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE = $00000020;
{$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE}
ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT = $00000040;
{$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT}
ACMFORMATCHOOSE_STYLEF_CONTEXTHELP = $00000080;
{$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_CONTEXTHELP}
function acmFormatChooseA(var pafmtc: TAcmFormatChooseA): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatChooseA}
function acmFormatChooseW(var pafmtc: TAcmFormatChooseW): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatChooseW}
function acmFormatChoose(var pafmtc: TAcmFormatChoose): MMRESULT; stdcall;
{$EXTERNALSYM acmFormatChoose}
//--------------------------------------------------------------------------;
//
// ACM Filter Tags
//
//--------------------------------------------------------------------------;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFilterTagDetails()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
const
ACMFILTERTAGDETAILS_FILTERTAG_CHARS = 48;
{$EXTERNALSYM ACMFILTERTAGDETAILS_FILTERTAG_CHARS}
type
PAcmFilterTagDetailsA = ^TAcmFilterTagDetailsA;
PAcmFilterTagDetailsW = ^TAcmFilterTagDetailsW;
PAcmFilterTagDetails = PAcmFilterTagDetailsA;
_ACMFILTERTAGDETAILSA = packed record
cbStruct: DWORD;
dwFilterTagIndex: DWORD;
dwFilterTag: DWORD;
cbFilterSize: DWORD;
fdwSupport: DWORD;
cStandardFilters: DWORD;
szFilterTag: array [0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS-1] of AnsiChar;
end;
{$EXTERNALSYM _ACMFILTERTAGDETAILSA}
_ACMFILTERTAGDETAILSW = packed record
cbStruct: DWORD;
dwFilterTagIndex: DWORD;
dwFilterTag: DWORD;
cbFilterSize: DWORD;
fdwSupport: DWORD;
cStandardFilters: DWORD;
szFilterTag: array [0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS-1] of WideChar;
end;
{$EXTERNALSYM _ACMFILTERTAGDETAILSW}
_ACMFILTERTAGDETAILS = _ACMFILTERTAGDETAILSA;
TAcmFilterTagDetailsA = _ACMFILTERTAGDETAILSA;
TAcmFilterTagDetailsW = _ACMFILTERTAGDETAILSW;
TAcmFilterTagDetails = TAcmFilterTagDetailsA;
function acmFilterTagDetailsA(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsA;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFilterTagDetailsA}
function acmFilterTagDetailsW(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsW;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFilterTagDetailsW}
function acmFilterTagDetails(had: HACMDRIVER; var paftd: TAcmFilterTagDetails;
fdwDetails: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFilterTagDetails}
const
ACM_FILTERTAGDETAILSF_INDEX = $00000000;
{$EXTERNALSYM ACM_FILTERTAGDETAILSF_INDEX}
ACM_FILTERTAGDETAILSF_FILTERTAG = $00000001;
{$EXTERNALSYM ACM_FILTERTAGDETAILSF_FILTERTAG}
ACM_FILTERTAGDETAILSF_LARGESTSIZE = $00000002;
{$EXTERNALSYM ACM_FILTERTAGDETAILSF_LARGESTSIZE}
ACM_FILTERTAGDETAILSF_QUERYMASK = $0000000F;
{$EXTERNALSYM ACM_FILTERTAGDETAILSF_QUERYMASK}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmFilterTagEnum()
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
type
ACMFILTERTAGENUMCBA = function (hadid: HACMDRIVERID; paftd: PAcmFilterTagDetailsA;
dwInstance: DWORD; fdwSupport: DWORD) : BOOL; stdcall;
{$EXTERNALSYM ACMFILTERTAGENUMCBA}
ACMFILTERTAGENUMCBW = function (hadid: HACMDRIVERID; paftd: PAcmFilterTagDetailsW;
dwInstance: DWORD; fdwSupport: DWORD) : BOOL; stdcall;
{$EXTERNALSYM ACMFILTERTAGENUMCBW}
ACMFILTERTAGENUMCB = ACMFILTERTAGENUMCBA;
function acmFilterTagEnumA(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsA;
fnCallback: ACMFILTERTAGENUMCBA; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
{$EXTERNALSYM acmFilterTagEnumA}
function acmFilterTagEnumW(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsW;