mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:33:01 +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)
|
if (DeviceType == MidiInDevice)
|
||||||
{
|
{
|
||||||
|
|
||||||
pClient->AuxEvent1 = CreateEvent(NULL, FALSE, FALSE, NULL);
|
pClient->AuxEvent1 = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
if (pClient->AuxEvent1 == NULL)
|
if (pClient->AuxEvent1 == NULL)
|
||||||
{
|
{
|
||||||
|
@ -174,6 +175,7 @@ static DWORD OpenMidiDevice(UINT DeviceType, DWORD ID, DWORD User, DWORD Param1,
|
||||||
|
|
||||||
// TaskCreate
|
// TaskCreate
|
||||||
|
|
||||||
|
|
||||||
WaitForSingleObject(pClient->AuxEvent2, INFINITE);
|
WaitForSingleObject(pClient->AuxEvent2, INFINITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,15 @@
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include <winbase.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)
|
#define MAX_MIDIINDRV (16)
|
||||||
|
|
|
@ -36,15 +36,7 @@ MMRESULT GetDeviceCapabilities(DWORD ID, UINT DeviceType,
|
||||||
if (Result != MMSYSERR_NOERROR)
|
if (Result != MMSYSERR_NOERROR)
|
||||||
return Result;
|
return Result;
|
||||||
|
|
||||||
//
|
if ((DeviceType == WaveOutDevice) || (DeviceType == WaveInDevice))
|
||||||
// Set our data.
|
|
||||||
//
|
|
||||||
// Setting the overlapped parameter (last) to null means we
|
|
||||||
// wait until the operation completes.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
if (DeviceType == WaveOutDevice)
|
|
||||||
{
|
{
|
||||||
Result = DeviceIoControl(DeviceHandle, IOCTL_WAVE_GET_CAPABILITIES,
|
Result = DeviceIoControl(DeviceHandle, IOCTL_WAVE_GET_CAPABILITIES,
|
||||||
NULL, 0, (LPVOID)pCaps, Size,
|
NULL, 0, (LPVOID)pCaps, Size,
|
||||||
|
@ -69,7 +61,7 @@ MMRESULT GetDeviceCapabilities(DWORD ID, UINT DeviceType,
|
||||||
|
|
||||||
|
|
||||||
// Close the handle and return the result code
|
// Close the handle and return the result code
|
||||||
// CloseHandle(DeviceHandle);
|
CloseHandle(DeviceHandle);
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
@ -81,6 +73,15 @@ static MMRESULT OpenWaveDevice(UINT DeviceType,
|
||||||
DWORD dwParam2)
|
DWORD dwParam2)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
|
//PWAVEALLOC pClient;
|
||||||
|
//MMRESULT mResult;
|
||||||
|
//BOOL Result;
|
||||||
|
//DWORD BytesReturned;
|
||||||
|
LPWAVEFORMATEX pFormats;
|
||||||
|
|
||||||
|
pFormats = (LPWAVEFORMATEX)((LPWAVEOPENDESC)dwParam1)->lpFormat;
|
||||||
|
|
||||||
|
|
||||||
return MMSYSERR_NOERROR;
|
return MMSYSERR_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue