Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > DoxygenmodMessage.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/modMessage.c 00005 * 00006 * PURPOSE: Provides the modMessage exported function, as required by 00007 * the MME API, for MIDI output 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 output. 00016 */ 00017 DWORD 00018 APIENTRY 00019 modMessage( 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_OUT_DEVICE_TYPE); 00029 00030 SND_TRACE(L"modMessage - Message type %d\n", Message); 00031 00032 switch ( Message ) 00033 { 00034 case MODM_GETNUMDEVS : 00035 { 00036 Result = GetSoundDeviceCount(MIDI_OUT_DEVICE_TYPE); 00037 break; 00038 } 00039 00040 case MODM_GETDEVCAPS : 00041 { 00042 Result = MmeGetSoundDeviceCapabilities(MIDI_OUT_DEVICE_TYPE, 00043 DeviceId, 00044 (PVOID) Parameter1, 00045 Parameter2); 00046 break; 00047 } 00048 00049 case DRV_QUERYDEVICEINTERFACESIZE : 00050 { 00051 Result = MmeGetDeviceInterfaceString(MIDI_OUT_DEVICE_TYPE, DeviceId, NULL, 0, (DWORD*)Parameter1); //FIXME DWORD_PTR 00052 break; 00053 } 00054 00055 case DRV_QUERYDEVICEINTERFACE : 00056 { 00057 Result = MmeGetDeviceInterfaceString(MIDI_OUT_DEVICE_TYPE, DeviceId, (LPWSTR)Parameter1, Parameter2, NULL); //FIXME DWORD_PTR 00058 break; 00059 } 00060 00061 case MODM_OPEN : 00062 { 00063 Result = MmeOpenDevice(MIDI_OUT_DEVICE_TYPE, 00064 DeviceId, 00065 (LPWAVEOPENDESC) Parameter1, /* unused */ 00066 Parameter2, 00067 (DWORD_PTR*)PrivateHandle); 00068 break; 00069 } 00070 00071 case MODM_CLOSE : 00072 { 00073 Result = MmeCloseDevice(PrivateHandle); 00074 00075 break; 00076 } 00077 00078 } 00079 00080 SND_TRACE(L"modMessage returning MMRESULT %d\n", Result); 00081 00082 ReleaseEntrypointMutex(MIDI_OUT_DEVICE_TYPE); 00083 00084 return Result; 00085 } Generated on Sat May 26 2012 04:35:02 for ReactOS by
1.7.6.1
|