Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > DoxygenmidMessage.c
Go to the documentation of this file.
00001 /* 00002 * PROJECT: ReactOS Sound System "MME Buddy" Library 00003 * LICENSE: GPL - See COPYING in the top level directory 00004 * FILE: lib/sound/mmebuddy/midi/midMessage.c 00005 * 00006 * PURPOSE: Provides the midMessage exported function, as required by 00007 * the MME API, for MIDI input device support. 00008 * 00009 * PROGRAMMERS: Andrew Greenwood (silverblade@reactos.org) 00010 */ 00011 00012 #include "precomp.h" 00013 00014 /* 00015 Standard MME driver entry-point for messages relating to MIDI input. 00016 */ 00017 DWORD 00018 APIENTRY 00019 midMessage( 00020 UINT DeviceId, 00021 UINT Message, 00022 DWORD_PTR PrivateHandle, 00023 DWORD_PTR Parameter1, 00024 DWORD_PTR Parameter2) 00025 { 00026 MMRESULT Result = MMSYSERR_NOTSUPPORTED; 00027 00028 AcquireEntrypointMutex(MIDI_IN_DEVICE_TYPE); 00029 00030 SND_TRACE(L"midMessage - Message type %d\n", Message); 00031 00032 switch ( Message ) 00033 { 00034 case MIDM_GETNUMDEVS : 00035 { 00036 Result = GetSoundDeviceCount(MIDI_IN_DEVICE_TYPE); 00037 break; 00038 } 00039 00040 case MIDM_GETDEVCAPS : 00041 { 00042 Result = MmeGetSoundDeviceCapabilities(MIDI_IN_DEVICE_TYPE, 00043 DeviceId, 00044 (PVOID) Parameter1, 00045 Parameter2); 00046 break; 00047 } 00048 00049 case DRV_QUERYDEVICEINTERFACESIZE : 00050 { 00051 Result = MmeGetDeviceInterfaceString(MIDI_IN_DEVICE_TYPE, DeviceId, NULL, 0, (DWORD*)Parameter1); //FIXME DWORD_PTR 00052 break; 00053 } 00054 00055 case DRV_QUERYDEVICEINTERFACE : 00056 { 00057 Result = MmeGetDeviceInterfaceString(MIDI_IN_DEVICE_TYPE, DeviceId, (LPWSTR)Parameter1, Parameter2, NULL); //FIXME DWORD_PTR 00058 break; 00059 } 00060 00061 case MIDM_OPEN : 00062 { 00063 Result = MmeOpenDevice(MIDI_IN_DEVICE_TYPE, 00064 DeviceId, 00065 (LPWAVEOPENDESC) Parameter1, 00066 Parameter2, 00067 (DWORD_PTR*) PrivateHandle); 00068 break; 00069 } 00070 00071 case MIDM_CLOSE : 00072 { 00073 Result = MmeCloseDevice(PrivateHandle); 00074 break; 00075 } 00076 00077 case MIDM_START : 00078 { 00079 Result = MmeSetState(PrivateHandle, TRUE); 00080 break; 00081 } 00082 00083 case MIDM_STOP : 00084 { 00085 Result = MmeSetState(PrivateHandle, FALSE); 00086 break; 00087 } 00088 } 00089 00090 SND_TRACE(L"midMessage returning MMRESULT %d\n", Result); 00091 00092 ReleaseEntrypointMutex(MIDI_IN_DEVICE_TYPE); 00093 00094 return Result; 00095 } Generated on Sun May 27 2012 04:36:12 for ReactOS by
1.7.6.1
|