mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +00:00
correct some bugs
svn path=/trunk/; revision=19397
This commit is contained in:
parent
529a616638
commit
fa1eae0697
3 changed files with 22 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue