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