* Sync up to trunk head (r60691).
[reactos.git] / dll / win32 / mmdrv / wave.h
1
2 // FIXME: Should be moved somewhere else?
3 typedef struct _WAVE_DD_VOLUME {
4 ULONG Left;
5 ULONG Right;
6 } WAVE_DD_VOLUME, *PWAVE_DD_VOLUME;
7
8 // driver
9 #define WAVE_DD_STOP 0x0001
10 #define WAVE_DD_PLAY 0x0002 // output devices only
11 #define WAVE_DD_RECORD 0x0003 // input devices only
12 #define WAVE_DD_RESET 0x0004
13
14 // ioctl
15 #define WAVE_DD_IDLE 0x0000
16 #define WAVE_DD_STOPPED 0x0001 // stopped
17 #define WAVE_DD_PLAYING 0x0002 // output devices only
18 #define WAVE_DD_RECORDING 0x0003 // input devices only
19
20
21
22 typedef enum {
23 WaveThreadInvalid,
24 WaveThreadAddBuffer,
25 WaveThreadSetState,
26 WaveThreadSetData,
27 WaveThreadGetData,
28 WaveThreadBreakLoop,
29 WaveThreadClose,
30 WaveThreadTerminate
31 } WAVETHREADFUNCTION;
32
33 // WARNING: MS code below!!
34 typedef struct {
35 OVERLAPPED Ovl;
36 LPWAVEHDR WaveHdr;
37 } WAVEOVL, *PWAVEOVL;
38
39 // WARNING: MS code below!!
40 // per allocation structure for wave
41 typedef struct tag_WAVEALLOC {
42 struct tag_WAVEALLOC *Next; // Chaining
43 UINT DeviceNumber; // Which device
44 UINT DeviceType; // WaveInput or WaveOutput
45 DWORD dwCallback; // client's callback
46 DWORD dwInstance; // client's instance data
47 DWORD dwFlags; // Open flags
48 HWAVE hWave; // handle for stream
49
50 HANDLE hDev; // Wave device handle
51 LPWAVEHDR DeviceQueue; // Buffers queued by application
52 LPWAVEHDR NextBuffer; // Next buffer to send to device
53 DWORD BufferPosition; // How far we're into a large buffer
54 DWORD BytesOutstanding;
55 // Bytes being processed by device
56 LPWAVEHDR LoopHead; // Start of loop if any
57 DWORD LoopCount; // Number more loops to go
58
59 WAVEOVL DummyWaveOvl; // For break loop
60 //
61 HANDLE Event; // Event for driver syncrhonization
62 // and notification of auxiliary
63 // task operation completion.
64 WAVETHREADFUNCTION AuxFunction; // Function for thread to perform
65 union {
66 LPWAVEHDR pHdr; // Buffer to pass in aux task
67 ULONG State; // State to set
68 struct {
69 ULONG Function; // IOCTL to use
70 PBYTE pData; // Data to set or get
71 ULONG DataLen; // Length of data
72 } GetSetData;
73
74 } AuxParam;
75 // 0 means terminate task.
76 HANDLE AuxEvent1; // Aux thread waits on this
77 HANDLE AuxEvent2; // Caller of Aux thread waits on this
78 HANDLE ThreadHandle; // Handle for thread termination ONLY
79 MMRESULT AuxReturnCode; // Return code from Aux task
80 }WAVEALLOC, *PWAVEALLOC;
81
82 /* Misc should move to own header */
83 MMRESULT GetDeviceCapabilities(DWORD ID, UINT DeviceType,
84 LPBYTE pCaps, DWORD Size);
85
86 DWORD AuxGetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume);
87 DWORD AuxSetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume);
88
89 typedef struct _AUX_DD_VOLUME {
90 ULONG Left;
91 ULONG Right;
92 } AUX_DD_VOLUME, *PAUX_DD_VOLUME;