ReactOS 0.4.16-dev-300-g2aadf2e
wodMessage.c File Reference
#include "precomp.h"
Include dependency graph for wodMessage.c:

Go to the source code of this file.

Functions

DWORD APIENTRY wodMessage (UINT DeviceId, UINT Message, DWORD_PTR PrivateHandle, DWORD_PTR Parameter1, DWORD_PTR Parameter2)
 

Function Documentation

◆ wodMessage()

DWORD APIENTRY wodMessage ( UINT  DeviceId,
UINT  Message,
DWORD_PTR  PrivateHandle,
DWORD_PTR  Parameter1,
DWORD_PTR  Parameter2 
)

Definition at line 29 of file wodMessage.c.

35{
37
39
40 SND_TRACE(L"wodMessage - Message type %d\n", Message);
41
42 switch ( Message )
43 {
44 case WODM_GETNUMDEVS :
45 {
47 break;
48 }
49
50 case WODM_GETDEVCAPS :
51 {
53 DeviceId,
54 (PVOID) Parameter1,
55 Parameter2);
56 break;
57 }
58
59 case WODM_OPEN :
60 {
62 DeviceId,
63 (LPWAVEOPENDESC) Parameter1,
64 Parameter2,
65 (DWORD_PTR*)PrivateHandle);
66 break;
67 }
68
69 case WODM_CLOSE :
70 {
71 Result = MmeCloseDevice(PrivateHandle);
72
73 break;
74 }
75
76 case WODM_PREPARE :
77 {
78 /* TODO: Do we need to pass 2nd parameter? */
79 Result = MmePrepareWaveHeader(PrivateHandle, Parameter1);
80 break;
81 }
82
83 case WODM_UNPREPARE :
84 {
85 Result = MmeUnprepareWaveHeader(PrivateHandle, Parameter1);
86 break;
87 }
88
89 case WODM_WRITE :
90 {
91 Result = MmeWriteWaveHeader(PrivateHandle, Parameter1);
92 break;
93 }
94
95 case WODM_RESET :
96 {
97 /* Stop playback, reset position to zero */
98 Result = MmeResetWavePlayback(PrivateHandle);
99 break;
100 }
101
102 case WODM_RESTART :
103 {
104 /* Continue playback when paused */
105 Result = MmeSetState(PrivateHandle, TRUE);
106 break;
107 }
108 case WODM_PAUSE :
109 {
110 /* pause playback */
111 Result = MmeSetState(PrivateHandle, FALSE);
112 break;
113 }
114
115 case WODM_GETPOS :
116 {
117 Result = MmeGetPosition(WAVE_OUT_DEVICE_TYPE, DeviceId, PrivateHandle, (MMTIME*)Parameter1, Parameter2);
118 break;
119 }
120
121 case WODM_GETVOLUME:
122 {
124 DeviceId,
125 PrivateHandle,
126 Parameter1);
127 break;
128 }
129
130 case WODM_SETVOLUME:
131 {
133 DeviceId,
134 PrivateHandle,
135 Parameter1);
136 break;
137 }
138
140 {
141 Result = MmeGetDeviceInterfaceString(WAVE_OUT_DEVICE_TYPE, DeviceId, NULL, 0, (DWORD*)Parameter1); //FIXME DWORD_PTR
142 break;
143 }
144
146 {
147 Result = MmeGetDeviceInterfaceString(WAVE_OUT_DEVICE_TYPE, DeviceId, (LPWSTR)Parameter1, Parameter2, NULL); //FIXME DWORD_PTR
148 break;
149 }
150 }
151
152 SND_TRACE(L"wodMessage returning MMRESULT %d\n", Result);
153
155
156 return Result;
157}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define WODM_PREPARE
Definition: mmddk.h:112
#define WODM_SETVOLUME
Definition: mmddk.h:122
#define DRV_QUERYDEVICEINTERFACESIZE
Definition: mmddk.h:97
#define WODM_OPEN
Definition: mmddk.h:110
#define WODM_RESET
Definition: mmddk.h:117
#define WODM_GETVOLUME
Definition: mmddk.h:121
#define WODM_WRITE
Definition: mmddk.h:114
#define WODM_RESTART
Definition: mmddk.h:116
#define WODM_GETNUMDEVS
Definition: mmddk.h:108
#define WODM_GETPOS
Definition: mmddk.h:118
#define WODM_GETDEVCAPS
Definition: mmddk.h:109
#define WODM_CLOSE
Definition: mmddk.h:111
#define DRV_QUERYDEVICEINTERFACE
Definition: mmddk.h:96
#define WODM_UNPREPARE
Definition: mmddk.h:113
#define WODM_PAUSE
Definition: mmddk.h:115
static const WCHAR Message[]
Definition: register.c:74
unsigned long DWORD
Definition: ntddk_ex.h:95
MMRESULT MmeOpenDevice(IN MMDEVICE_TYPE DeviceType, IN UINT DeviceId, IN LPWAVEOPENDESC OpenParameters, IN DWORD Flags, OUT DWORD_PTR *PrivateHandle)
Definition: mmewrap.c:132
MMRESULT MmeCloseDevice(IN DWORD_PTR PrivateHandle)
Definition: mmewrap.c:225
#define MmePrepareWaveHeader(private_handle, header)
Definition: mmebuddy.h:414
VOID AcquireEntrypointMutex(IN MMDEVICE_TYPE DeviceType)
Definition: reentrancy.c:75
ULONG GetSoundDeviceCount(IN MMDEVICE_TYPE DeviceType)
Definition: devicelist.c:67
MMRESULT MmeGetDeviceInterfaceString(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN LPWSTR Interface, IN DWORD InterfaceLength, OUT DWORD *InterfaceSize)
Definition: mmewrap.c:294
MMRESULT MmeGetPosition(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN DWORD_PTR PrivateHandle, IN MMTIME *Time, IN DWORD Size)
Definition: mmewrap.c:327
MMRESULT MmeSetState(IN DWORD_PTR PrivateHandle, IN BOOL bStart)
Definition: mmewrap.c:19
MMRESULT MmeResetWavePlayback(IN DWORD_PTR PrivateHandle)
Definition: mmewrap.c:280
MMRESULT MmeGetVolume(_In_ MMDEVICE_TYPE DeviceType, _In_ DWORD DeviceId, _In_ DWORD_PTR PrivateHandle, _Out_ DWORD_PTR pdwVolume)
Definition: mmewrap.c:369
#define MmeUnprepareWaveHeader(private_handle, header)
Definition: mmebuddy.h:417
#define MmeWriteWaveHeader(private_handle, header)
Definition: mmebuddy.h:420
VOID ReleaseEntrypointMutex(IN MMDEVICE_TYPE DeviceType)
Definition: reentrancy.c:92
MMRESULT MmeGetSoundDeviceCapabilities(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN PVOID Capabilities, IN DWORD CapabilitiesSize)
Definition: mmewrap.c:103
MMRESULT MmeSetVolume(_In_ MMDEVICE_TYPE DeviceType, _In_ DWORD DeviceId, _In_ DWORD_PTR PrivateHandle, _In_ DWORD_PTR dwVolume)
Definition: mmewrap.c:409
#define SND_TRACE(...)
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define L(x)
Definition: ntvdm.h:50
@ WAVE_OUT_DEVICE_TYPE
Definition: sndtypes.h:29
uint32_t DWORD_PTR
Definition: typedefs.h:65
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
WCHAR * LPWSTR
Definition: xmlstorage.h:184