[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
31 typedef MIXER_STATUS(*PMIXER_DEVICE_CONTROL)(
32 IN HANDLE hMixer,
33 IN ULONG dwIoControlCode,
34 IN PVOID lpInBuffer,
35 IN ULONG nInBufferSize,
36 OUT PVOID lpOutBuffer,
37 ULONG nOutBufferSize,
38 PULONG lpBytesReturned);
39
40 typedef MIXER_STATUS(*PMIXER_OPEN)(
41 IN LPWSTR DevicePath,
42 OUT PHANDLE hDevice);
43
44 typedef MIXER_STATUS(*PMIXER_CLOSE)(
45 IN HANDLE hDevice);
46
47 typedef VOID (*PMIXER_EVENT)(
48 IN PVOID MixerEvent);
49
50 typedef VOID (*PMIXER_COPY)(
51 IN PVOID Dst,
52 IN PVOID Src,
53 IN ULONG Length);
54
55
56 typedef struct
57 {
58 ULONG SizeOfStruct;
59 PVOID MixerContext;
60
61 PMIXER_ALLOC Alloc;
62 PMIXER_DEVICE_CONTROL Control;
63 PMIXER_FREE Free;
64 PMIXER_OPEN Open;
65 PMIXER_CLOSE Close;
66 PMIXER_COPY Copy;
67 }MIXER_CONTEXT, *PMIXER_CONTEXT;
68
69 MIXER_STATUS
70 MMixerInitialize(
71 IN PMIXER_CONTEXT MixerContext,
72 IN PMIXER_ENUM EnumFunction,
73 IN PVOID EnumContext);
74
75 ULONG
76 MMixerGetCount(
77 IN PMIXER_CONTEXT MixerContext);
78
79 MIXER_STATUS
80 MMixerGetCapabilities(
81 IN PMIXER_CONTEXT MixerContext,
82 IN ULONG MixerIndex,
83 OUT LPMIXERCAPSW MixerCaps);
84
85 MIXER_STATUS
86 MMixerOpen(
87 IN PMIXER_CONTEXT MixerContext,
88 IN ULONG MixerId,
89 IN PVOID MixerEvent,
90 IN PMIXER_EVENT MixerEventRoutine,
91 OUT PHANDLE MixerHandle);
92
93 MIXER_STATUS
94 MMixerGetLineInfo(
95 IN PMIXER_CONTEXT MixerContext,
96 IN HANDLE MixerHandle,
97 IN ULONG Flags,
98 OUT LPMIXERLINEW MixerLine);
99
100 MIXER_STATUS
101 MMixerGetLineControls(
102 IN PMIXER_CONTEXT MixerContext,
103 IN HANDLE MixerHandle,
104 IN ULONG Flags,
105 OUT LPMIXERLINECONTROLS MixerLineControls);
106
107 MIXER_STATUS
108 MMixerSetControlDetails(
109 IN PMIXER_CONTEXT MixerContext,
110 IN HANDLE MixerHandle,
111 IN ULONG Flags,
112 OUT LPMIXERCONTROLDETAILS MixerControlDetails);
113
114 MIXER_STATUS
115 MMixerGetControlDetails(
116 IN PMIXER_CONTEXT MixerContext,
117 IN HANDLE MixerHandle,
118 IN ULONG Flags,
119 OUT LPMIXERCONTROLDETAILS MixerControlDetails);
120
121 #endif