4b7b93fa35cb238c9096e011a968d76566b606d8
[reactos.git] / reactos / dll / win32 / mmdrv / mmioctl.h
1 /*
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS Multimedia
5 * FILE: dll/win32/mmdrv/mmioctl.h
6 * PURPOSE: Multimedia system NT4 compatibility
7 * PROGRAMMER: Andrew Greenwood
8 * UPDATE HISTORY:
9 * Jan 13, 2007: Split from mmdrv.h
10 */
11
12 #ifndef MMDRV_IOCTLS
13 #define MMDRV_IOCTLS
14
15 #include <windows.h>
16 //#include <mmsystem.h>
17 //#include <mmddk.h>
18 #include <winioctl.h>
19
20
21 /*
22 Base names of the supported devices, as provided by drivers running in
23 kernel mode.
24
25 \Device\WaveIn0 etc.
26 */
27
28 #define WAVE_OUT_DEVICE_NAME L"\\Device\\WaveOut"
29 #define WAVE_IN_DEVICE_NAME L"\\Device\\WaveIn"
30 #define MIDI_OUT_DEVICE_NAME L"\\Device\\MidiOut"
31 #define MIDI_IN_DEVICE_NAME L"\\Device\\MidiIn"
32 #define AUX_DEVICE_NAME L"\\Device\\MMAux"
33
34
35 /*
36 Base IOCTL codes
37 */
38
39 #define IOCTL_SOUND_BASE FILE_DEVICE_SOUND
40 #define IOCTL_WAVE_BASE 0x0000
41 #define IOCTL_MIDI_BASE 0x0080
42 #define IOCTL_AUX_BASE 0x0100
43
44
45 /*
46 Wave IOCTLs
47 */
48
49 #define IOCTL_WAVE_QUERY_FORMAT \
50 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
51
52 #define IOCTL_WAVE_SET_FORMAT \
53 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0002, METHOD_BUFFERED, FILE_WRITE_ACCESS)
54
55 #define IOCTL_WAVE_GET_CAPABILITIES \
56 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
57
58 #define IOCTL_WAVE_SET_STATE \
59 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0004, METHOD_BUFFERED, FILE_WRITE_ACCESS)
60
61 #define IOCTL_WAVE_GET_STATE \
62 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0005, METHOD_BUFFERED, FILE_WRITE_ACCESS)
63
64 #define IOCTL_WAVE_GET_POSITION \
65 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0006, METHOD_BUFFERED, FILE_WRITE_ACCESS)
66
67 #define IOCTL_WAVE_SET_VOLUME \
68 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
69
70 #define IOCTL_WAVE_GET_VOLUME \
71 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
72
73 #define IOCTL_WAVE_SET_PITCH \
74 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0009, METHOD_BUFFERED, FILE_WRITE_ACCESS)
75
76 #define IOCTL_WAVE_GET_PITCH \
77 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x000A, METHOD_BUFFERED, FILE_WRITE_ACCESS)
78
79 #define IOCTL_WAVE_SET_PLAYBACK_RATE \
80 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x000B, METHOD_BUFFERED, FILE_WRITE_ACCESS)
81
82 #define IOCTL_WAVE_GET_PLAYBACK_RATE \
83 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x000C, METHOD_BUFFERED, FILE_WRITE_ACCESS)
84
85 #define IOCTL_WAVE_PLAY \
86 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x000D, METHOD_IN_DIRECT, FILE_WRITE_ACCESS)
87
88 #define IOCTL_WAVE_RECORD \
89 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x000E, METHOD_OUT_DIRECT, FILE_WRITE_ACCESS)
90
91 #define IOCTL_WAVE_BREAK_LOOP \
92 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x000F, METHOD_BUFFERED, FILE_WRITE_ACCESS)
93
94 #define IOCTL_WAVE_SET_LOW_PRIORITY \
95 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_WAVE_BASE + 0x0010, METHOD_BUFFERED, FILE_WRITE_ACCESS)
96
97
98 /*
99 MIDI IOCTLs
100 */
101
102 #define IOCTL_MIDI_GET_CAPABILITIES \
103 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
104
105 #define IOCTL_MIDI_SET_STATE \
106 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0002, METHOD_BUFFERED, FILE_WRITE_ACCESS)
107
108 #define IOCTL_MIDI_GET_STATE \
109 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0003, METHOD_BUFFERED, FILE_WRITE_ACCESS)
110
111 #define IOCTL_MIDI_SET_VOLUME \
112 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
113
114 #define IOCTL_MIDI_GET_VOLUME \
115 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
116
117 #define IOCTL_MIDI_PLAY \
118 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0006, METHOD_BUFFERED, FILE_WRITE_ACCESS)
119
120 #define IOCTL_MIDI_RECORD \
121 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0007, METHOD_BUFFERED, FILE_WRITE_ACCESS)
122
123 #define IOCTL_MIDI_CACHE_PATCHES \
124 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0008, METHOD_BUFFERED, FILE_WRITE_ACCESS)
125
126 #define IOCTL_MIDI_CACHE_DRUM_PATCHES \
127 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_MIDI_BASE + 0x0009, METHOD_BUFFERED, FILE_WRITE_ACCESS)
128
129
130 /*
131 Aux IOCTLs
132 */
133
134 #define IOCTL_AUX_GET_CAPABILITIES \
135 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_AUX_BASE + 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
136
137 #define IOCTL_AUX_SET_VOLUME \
138 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_AUX_BASE + 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
139
140 #define IOCTL_AUX_GET_VOLUME \
141 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_AUX_BASE + 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
142
143 #define IOCTL_SOUND_GET_CHANGED_VOLUME \
144 CTL_CODE(IOCTL_SOUND_BASE, IOCTL_AUX_BASE + 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
145
146 #endif