ReactOS  0.4.14-dev-1338-g0d187f7
mme.c File Reference
#include "mmdrv.h"
#include <debug.h>
Include dependency graph for mme.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOL NotifyClient (SessionInfo *session_info, DWORD message, DWORD_PTR parameter1, DWORD_PTR parameter2)
 
DWORD APIENTRY wodMessage (UINT device_id, UINT message, DWORD_PTR private_handle, DWORD_PTR parameter1, DWORD_PTR parameter2)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 15 of file mme.c.

Function Documentation

◆ NotifyClient()

BOOL NotifyClient ( SessionInfo session_info,
DWORD  message,
DWORD_PTR  parameter1,
DWORD_PTR  parameter2 
)

Definition at line 25 of file mme.c.

30 {
31  return DriverCallback(session_info->callback,
32  HIWORD(session_info->flags),
33  session_info->mme_handle,
34  message,
35  session_info->app_user_data,
36  parameter1,
37  parameter2);
38 }
Definition: tftpd.h:59
DWORD flags
Definition: mmdrv.h:153
DWORD_PTR app_user_data
Definition: mmdrv.h:150
HDRVR mme_handle
Definition: mmdrv.h:141
DWORD_PTR callback
Definition: mmdrv.h:151
#define HIWORD(l)
Definition: typedefs.h:246
BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)

Referenced by OpenDevice(), and ReturnCompletedBuffers().

◆ wodMessage()

DWORD APIENTRY wodMessage ( UINT  device_id,
UINT  message,
DWORD_PTR  private_handle,
DWORD_PTR  parameter1,
DWORD_PTR  parameter2 
)

Definition at line 48 of file mme.c.

54 {
55  switch ( message )
56  {
57  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p80.htm */
58  case WODM_GETNUMDEVS :
59  DPRINT("WODM_GETNUMDEVS\n");
61 
62  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p6h.htm */
63  case WODM_GETDEVCAPS :
64  DPRINT("WODM_GETDEVCAPS\n");
66  device_id,
67  parameter1,
68  parameter2);
69 
70  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p85.htm */
71  case WODM_OPEN :
72  {
73  WAVEOPENDESC* open_desc = (WAVEOPENDESC*) parameter1;
74  DPRINT("WODM_OPEN\n");
75 
76  if ( parameter2 && WAVE_FORMAT_QUERY )
77  return QueryWaveFormat(WaveOutDevice, open_desc->lpFormat);
78  else
80  device_id,
81  open_desc,
82  parameter2,
83  private_handle);
84  }
85 
86  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p6g.htm */
87  case WODM_CLOSE :
88  {
89  DPRINT("WODM_CLOSE\n");
90  return CloseDevice(private_handle);
91  }
92 
93  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p9w.htm */
94  case WODM_WRITE :
95  {
96  DPRINT("WODM_WRITE\n");
97  return WriteWaveBuffer(private_handle,
98  (PWAVEHDR) parameter1,
99  parameter2);
100  }
101 
102  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p86.htm */
103  case WODM_PAUSE :
104  {
105  DPRINT("WODM_PAUSE\n");
106  return HandleBySessionThread(private_handle, message, 0);
107  }
108 
109  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p89.htm */
110  case WODM_RESTART :
111  {
112  DPRINT("WODM_RESTART\n");
113  return HandleBySessionThread(private_handle, message, 0);
114  }
115 
116  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p88.htm */
117  case WODM_RESET :
118  {
119  DPRINT("WODM_RESET\n");
120  return HandleBySessionThread(private_handle, message, 0);
121  }
122 
123  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p83.htm */
124 #if 0
125  case WODM_GETPOS :
126  {
127  DPRINT("WODM_GETPOS\n");
128  return GetPosition(private_handle,
129  (PMMTIME) parameter1,
130  parameter2);
131  }
132 #endif
133 
134  /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p6f.htm */
135  case WODM_BREAKLOOP :
136  {
137  DPRINT("WODM_BREAKLOOP\n");
138  return HandleBySessionThread(private_handle, message, 0);
139  }
140 
141  /* TODO: Others */
142  }
143 
144  DPRINT("Unsupported message\n");
145  return MMSYSERR_NOTSUPPORTED;
146 }
MMRESULT CloseDevice(DeviceInfo *device_info)
Definition: beepmidi.c:383
#define WODM_PAUSE
Definition: mmddk.h:115
#define WAVE_FORMAT_QUERY
Definition: mmsystem.h:188
Definition: tftpd.h:59
DWORD WriteWaveBuffer(DWORD_PTR private_handle, PWAVEHDR wave_header, DWORD wave_header_size)
Definition: wave.c:372
#define WODM_GETDEVCAPS
Definition: mmddk.h:109
#define WODM_RESTART
Definition: mmddk.h:116
#define WODM_OPEN
Definition: mmddk.h:110
MMRESULT OpenDevice(DeviceInfo **private_data, MIDIOPENDESC *open_desc, DWORD flags)
Definition: beepmidi.c:264
void DPRINT(...)
Definition: polytest.cpp:61
DWORD QueryWaveFormat(DeviceType device_type, PVOID lpFormat)
Definition: wave.c:335
#define WODM_BREAKLOOP
Definition: mmddk.h:125
#define WODM_WRITE
Definition: mmddk.h:114
LPWAVEFORMATEX lpFormat
Definition: mmddk.h:399
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define WODM_CLOSE
Definition: mmddk.h:111
DWORD GetDeviceCount(DeviceType device_type)
Definition: common.c:58
#define WODM_GETPOS
Definition: mmddk.h:118
DWORD HandleBySessionThread(DWORD_PTR private_handle, DWORD_PTR message, DWORD_PTR parameter)
Definition: session.c:240
MMRESULT GetDeviceCapabilities(MIDIOUTCAPS *caps)
Definition: beepmidi.c:210
DWORD GetPosition(DWORD private_handle, PMMTIME time, DWORD time_size)
#define WODM_RESET
Definition: mmddk.h:117
#define WODM_GETNUMDEVS
Definition: mmddk.h:108

Referenced by MMDRV_Install().