2 * PROJECT: ReactOS Sound System "MME Buddy" Library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/sound/mmebuddy/midi/midMessage.c
6 * PURPOSE: Provides the midMessage exported function, as required by
7 * the MME API, for MIDI input device support.
9 * PROGRAMMERS: Andrew Greenwood (silverblade@reactos.org)
15 Standard MME driver entry-point for messages relating to MIDI input.
22 DWORD_PTR PrivateHandle
,
26 MMRESULT Result
= MMSYSERR_NOTSUPPORTED
;
28 AcquireEntrypointMutex(MIDI_IN_DEVICE_TYPE
);
30 SND_TRACE(L
"midMessage - Message type %d\n", Message
);
34 case MIDM_GETNUMDEVS
:
36 Result
= GetSoundDeviceCount(MIDI_IN_DEVICE_TYPE
);
40 case MIDM_GETDEVCAPS
:
42 Result
= MmeGetSoundDeviceCapabilities(MIDI_IN_DEVICE_TYPE
,
49 case DRV_QUERYDEVICEINTERFACESIZE
:
51 Result
= MmeGetDeviceInterfaceString(MIDI_IN_DEVICE_TYPE
, DeviceId
, NULL
, 0, (DWORD
*)Parameter1
); //FIXME DWORD_PTR
55 case DRV_QUERYDEVICEINTERFACE
:
57 Result
= MmeGetDeviceInterfaceString(MIDI_IN_DEVICE_TYPE
, DeviceId
, (LPWSTR
)Parameter1
, Parameter2
, NULL
); //FIXME DWORD_PTR
63 Result
= MmeOpenDevice(MIDI_IN_DEVICE_TYPE
,
65 (LPWAVEOPENDESC
) Parameter1
,
67 (DWORD_PTR
*) PrivateHandle
);
73 Result
= MmeCloseDevice(PrivateHandle
);
79 Result
= MmeSetState(PrivateHandle
, TRUE
);
85 Result
= MmeSetState(PrivateHandle
, FALSE
);
90 SND_TRACE(L
"midMessage returning MMRESULT %d\n", Result
);
92 ReleaseEntrypointMutex(MIDI_IN_DEVICE_TYPE
);