[MMIXER]
[reactos.git] / reactos / lib / drivers / sound / mmixer / mmixer.h
1 #ifndef MIXER_H__
2 #define MIXER_H__
3
4 typedef enum
5 {
6 MM_STATUS_SUCCESS = 0,
7 MM_STATUS_NOTINITIALIZED,
8 MM_STATUS_NOT_IMPLEMENTED,
9 MM_STATUS_NO_MORE_DEVICES,
10 MM_STATUS_MORE_ENTRIES,
11 MM_STATUS_INVALID_PARAMETER,
12 MM_STATUS_UNSUCCESSFUL,
13 MM_STATUS_NO_MEMORY
14
15
16 }MIXER_STATUS;
17
18
19 typedef PVOID (*PMIXER_ALLOC)(
20 IN ULONG NumberOfBytes);
21
22 typedef VOID (*PMIXER_FREE)(
23 IN PVOID Block);
24
25 typedef MIXER_STATUS (*PMIXER_ENUM)(
26 IN PVOID EnumContext,
27 IN ULONG DeviceIndex,
28 OUT LPWSTR * DeviceName,
29 OUT PHANDLE OutHandle,
30 OUT PHANDLE OutDevInterfaceKey);
31
32 typedef MIXER_STATUS(*PMIXER_DEVICE_CONTROL)(
33 IN HANDLE hMixer,
34 IN ULONG dwIoControlCode,
35 IN PVOID lpInBuffer,
36 IN ULONG nInBufferSize,
37 OUT PVOID lpOutBuffer,
38 ULONG nOutBufferSize,
39 PULONG lpBytesReturned);
40
41 typedef MIXER_STATUS(*PMIXER_OPEN)(
42 IN LPWSTR DevicePath,
43 OUT PHANDLE hDevice);
44
45 typedef MIXER_STATUS(*PMIXER_CLOSE)(
46 IN HANDLE hDevice);
47
48 typedef MIXER_STATUS(*PMIXER_CLOSEKEY)(
49 IN HANDLE hKey);
50
51 typedef VOID (*PMIXER_EVENT)(
52 IN PVOID MixerEvent);
53
54 typedef VOID (*PMIXER_COPY)(
55 IN PVOID Dst,
56 IN PVOID Src,
57 IN ULONG Length);
58
59 typedef MIXER_STATUS(*PMIXER_QUERY_KEY_VALUE)(
60 IN HANDLE hKey,
61 IN LPWSTR KeyName,
62 OUT PVOID * ResultBuffer,
63 OUT PULONG ResultLength,
64 OUT PULONG KeyType);
65
66 typedef MIXER_STATUS(*PMIXER_OPEN_KEY)(
67 IN HANDLE hKey,
68 IN LPWSTR SubKey,
69 IN ULONG DesiredAccess,
70 OUT PHANDLE OutKey);
71
72 typedef struct
73 {
74 ULONG SizeOfStruct;
75 PVOID MixerContext;
76
77 PMIXER_ALLOC Alloc;
78 PMIXER_DEVICE_CONTROL Control;
79 PMIXER_FREE Free;
80 PMIXER_OPEN Open;
81 PMIXER_CLOSE Close;
82 PMIXER_COPY Copy;
83 PMIXER_OPEN_KEY OpenKey;
84 PMIXER_QUERY_KEY_VALUE QueryKeyValue;
85 PMIXER_CLOSEKEY CloseKey;
86 }MIXER_CONTEXT, *PMIXER_CONTEXT;
87
88 MIXER_STATUS
89 MMixerInitialize(
90 IN PMIXER_CONTEXT MixerContext,
91 IN PMIXER_ENUM EnumFunction,
92 IN PVOID EnumContext);
93
94 ULONG
95 MMixerGetCount(
96 IN PMIXER_CONTEXT MixerContext);
97
98 MIXER_STATUS
99 MMixerGetCapabilities(
100 IN PMIXER_CONTEXT MixerContext,
101 IN ULONG MixerIndex,
102 OUT LPMIXERCAPSW MixerCaps);
103
104 MIXER_STATUS
105 MMixerOpen(
106 IN PMIXER_CONTEXT MixerContext,
107 IN ULONG MixerId,
108 IN PVOID MixerEvent,
109 IN PMIXER_EVENT MixerEventRoutine,
110 OUT PHANDLE MixerHandle);
111
112 MIXER_STATUS
113 MMixerGetLineInfo(
114 IN PMIXER_CONTEXT MixerContext,
115 IN HANDLE MixerHandle,
116 IN ULONG Flags,
117 OUT LPMIXERLINEW MixerLine);
118
119 MIXER_STATUS
120 MMixerGetLineControls(
121 IN PMIXER_CONTEXT MixerContext,
122 IN HANDLE MixerHandle,
123 IN ULONG Flags,
124 OUT LPMIXERLINECONTROLS MixerLineControls);
125
126 MIXER_STATUS
127 MMixerSetControlDetails(
128 IN PMIXER_CONTEXT MixerContext,
129 IN HANDLE MixerHandle,
130 IN ULONG Flags,
131 OUT LPMIXERCONTROLDETAILS MixerControlDetails);
132
133 MIXER_STATUS
134 MMixerGetControlDetails(
135 IN PMIXER_CONTEXT MixerContext,
136 IN HANDLE MixerHandle,
137 IN ULONG Flags,
138 OUT LPMIXERCONTROLDETAILS MixerControlDetails);
139
140 #endif