correct some bugs

svn path=/trunk/; revision=19397
This commit is contained in:
Magnus Olsen 2005-11-20 23:25:16 +00:00
parent 529a616638
commit fa1eae0697
3 changed files with 22 additions and 10 deletions

View file

@ -157,6 +157,7 @@ static DWORD OpenMidiDevice(UINT DeviceType, DWORD ID, DWORD User, DWORD Param1,
if (DeviceType == MidiInDevice)
{
pClient->AuxEvent1 = CreateEvent(NULL, FALSE, FALSE, NULL);
if (pClient->AuxEvent1 == NULL)
{
@ -174,6 +175,7 @@ static DWORD OpenMidiDevice(UINT DeviceType, DWORD ID, DWORD User, DWORD Param1,
// TaskCreate
WaitForSingleObject(pClient->AuxEvent2, INFINITE);
}

View file

@ -29,6 +29,15 @@
#include <mmsystem.h>
#include <winbase.h>
typedef VOID (TASKCALLBACK) (DWORD dwInst);
typedef TASKCALLBACK FAR *LPTASKCALLBACK;
UINT APIENTRY mmTaskCreate(LPTASKCALLBACK lpfn, HANDLE FAR * lph, DWORD dwInst);
VOID APIENTRY mmTaskBlock(DWORD h);
BOOL APIENTRY mmTaskSignal(DWORD h);
VOID APIENTRY mmTaskYield(VOID);
DWORD APIENTRY mmGetCurrentTask(VOID);
#define MAX_MIDIINDRV (16)

View file

@ -36,15 +36,7 @@ MMRESULT GetDeviceCapabilities(DWORD ID, UINT DeviceType,
if (Result != MMSYSERR_NOERROR)
return Result;
//
// Set our data.
//
// Setting the overlapped parameter (last) to null means we
// wait until the operation completes.
//
if (DeviceType == WaveOutDevice)
if ((DeviceType == WaveOutDevice) || (DeviceType == WaveInDevice))
{
Result = DeviceIoControl(DeviceHandle, IOCTL_WAVE_GET_CAPABILITIES,
NULL, 0, (LPVOID)pCaps, Size,
@ -69,7 +61,7 @@ MMRESULT GetDeviceCapabilities(DWORD ID, UINT DeviceType,
// Close the handle and return the result code
// CloseHandle(DeviceHandle);
CloseHandle(DeviceHandle);
return Result;
}
@ -81,6 +73,15 @@ static MMRESULT OpenWaveDevice(UINT DeviceType,
DWORD dwParam2)
{
// TODO: Implement
//PWAVEALLOC pClient;
//MMRESULT mResult;
//BOOL Result;
//DWORD BytesReturned;
LPWAVEFORMATEX pFormats;
pFormats = (LPWAVEFORMATEX)((LPWAVEOPENDESC)dwParam1)->lpFormat;
return MMSYSERR_NOERROR;
}