mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 02:37:06 +00:00
Silence debug messages
svn path=/trunk/; revision=13419
This commit is contained in:
parent
e83557fa58
commit
a1c0a3b1d6
|
@ -14,7 +14,7 @@ TARGET_CFLAGS += -DUNICODE -D_UNICODE -Wall -Werror
|
|||
|
||||
TARGET_LFLAGS =
|
||||
|
||||
TARGET_SDKLIBS = winmm.a
|
||||
TARGET_SDKLIBS = winmm.a ntdll.a
|
||||
|
||||
TARGET_BASE = $(TARGET_BASE_LIB_MMDRV)
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#include "mmdrv.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
APIENTRY DWORD auxMessage(UINT uDevice,
|
||||
UINT uMessage,
|
||||
|
@ -20,7 +22,7 @@ APIENTRY DWORD auxMessage(UINT uDevice,
|
|||
DWORD dwParam2)
|
||||
|
||||
{
|
||||
printf("auxMessage\n");
|
||||
DPRINT("auxMessage\n");
|
||||
|
||||
// the following cases are documented by DDK
|
||||
switch (uMessage)
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
#include "mmdrv.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
||||
|
@ -22,14 +24,14 @@ CRITICAL_SECTION DriverSection;
|
|||
APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message,
|
||||
LONG Param1, LONG Param2)
|
||||
{
|
||||
printf("DriverProc\n");
|
||||
DPRINT("DriverProc\n");
|
||||
|
||||
// HINSTANCE Module;
|
||||
|
||||
switch(Message)
|
||||
{
|
||||
case DRV_LOAD :
|
||||
printf("DRV_LOAD\n");
|
||||
DPRINT("DRV_LOAD\n");
|
||||
return TRUE; // dont need to do any more
|
||||
/*
|
||||
Module = GetDriverModuleHandle(DriverHandle);
|
||||
|
@ -56,7 +58,7 @@ APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message,
|
|||
// return 1L;
|
||||
|
||||
case DRV_FREE :
|
||||
printf("DRV_FREE\n");
|
||||
DPRINT("DRV_FREE\n");
|
||||
|
||||
// TerminateMidi();
|
||||
// TerminateWave();
|
||||
|
@ -65,35 +67,35 @@ APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message,
|
|||
return 1L;
|
||||
|
||||
case DRV_OPEN :
|
||||
printf("DRV_OPEN\n");
|
||||
DPRINT("DRV_OPEN\n");
|
||||
return 1L;
|
||||
|
||||
case DRV_CLOSE :
|
||||
printf("DRV_CLOSE\n");
|
||||
DPRINT("DRV_CLOSE\n");
|
||||
return 1L;
|
||||
|
||||
case DRV_ENABLE :
|
||||
printf("DRV_ENABLE\n");
|
||||
DPRINT("DRV_ENABLE\n");
|
||||
return 1L;
|
||||
|
||||
case DRV_DISABLE :
|
||||
printf("DRV_DISABLE\n");
|
||||
DPRINT("DRV_DISABLE\n");
|
||||
return 1L;
|
||||
|
||||
case DRV_QUERYCONFIGURE :
|
||||
printf("DRV_QUERYCONFIGURE\n");
|
||||
DPRINT("DRV_QUERYCONFIGURE\n");
|
||||
return 0L;
|
||||
|
||||
case DRV_CONFIGURE :
|
||||
printf("DRV_CONFIGURE\n");
|
||||
DPRINT("DRV_CONFIGURE\n");
|
||||
return 0L;
|
||||
|
||||
case DRV_INSTALL :
|
||||
printf("DRV_INSTALL\n");
|
||||
DPRINT("DRV_INSTALL\n");
|
||||
return DRVCNF_RESTART;
|
||||
|
||||
default :
|
||||
printf("?\n");
|
||||
DPRINT("?\n");
|
||||
return DefDriverProc(DriverID, DriverHandle, Message, Param1, Param2);
|
||||
};
|
||||
}
|
||||
|
@ -101,7 +103,7 @@ APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message,
|
|||
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
|
||||
{
|
||||
printf("DllMain called!\n");
|
||||
DPRINT("DllMain called!\n");
|
||||
|
||||
if (Reason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "mmdrv.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
// MIDI device instance information
|
||||
//
|
||||
|
@ -66,7 +68,7 @@ static DWORD OpenMidiDevice(UINT DeviceType, DWORD ID, DWORD User, DWORD Param1,
|
|||
MMRESULT Result = MMSYSERR_NOERROR;
|
||||
|
||||
// Check ID?
|
||||
printf("OpenMidiDevice()\n");
|
||||
DPRINT("OpenMidiDevice()\n");
|
||||
|
||||
switch(DeviceType)
|
||||
{
|
||||
|
@ -119,7 +121,7 @@ static DWORD WriteMidi(PBYTE pData, ULONG Length, PMIDIALLOC pClient)
|
|||
{
|
||||
DWORD BytesReturned;
|
||||
|
||||
printf("IOCTL_MIDI_PLAY == %d [%x]\n", IOCTL_MIDI_PLAY, IOCTL_MIDI_PLAY);
|
||||
DPRINT("IOCTL_MIDI_PLAY == %d [%x]\n", IOCTL_MIDI_PLAY, IOCTL_MIDI_PLAY);
|
||||
|
||||
if ( !DeviceIoControl(pClient->DeviceHandle, IOCTL_MIDI_PLAY, (PVOID)pData,
|
||||
Length, NULL, 0, &BytesReturned, NULL))
|
||||
|
@ -174,40 +176,40 @@ static int GetMidiLength(PMIDIALLOC pClient, BYTE b)
|
|||
|
||||
APIENTRY DWORD midMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
printf("midMessage\n");
|
||||
DPRINT("midMessage\n");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
switch (dwMessage) {
|
||||
case MIDM_GETNUMDEVS:
|
||||
printf("MIDM_GETNUMDEVS");
|
||||
DPRINT("MIDM_GETNUMDEVS");
|
||||
return 0;
|
||||
|
||||
case MIDM_GETDEVCAPS:
|
||||
printf("MIDM_GETDEVCAPS");
|
||||
DPRINT("MIDM_GETDEVCAPS");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
case MIDM_OPEN:
|
||||
printf("MIDM_OPEN");
|
||||
DPRINT("MIDM_OPEN");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
case MIDM_CLOSE:
|
||||
printf("MIDM_CLOSE");
|
||||
DPRINT("MIDM_CLOSE");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
case MIDM_ADDBUFFER:
|
||||
printf("MIDM_ADDBUFFER");
|
||||
DPRINT("MIDM_ADDBUFFER");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
case MIDM_STOP:
|
||||
printf("MIDM_PAUSE");
|
||||
DPRINT("MIDM_PAUSE");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
case MIDM_START:
|
||||
printf("MIDM_RESTART");
|
||||
DPRINT("MIDM_RESTART");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
case MIDM_RESET:
|
||||
printf("MIDM_RESET");
|
||||
DPRINT("MIDM_RESET");
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
default:
|
||||
|
@ -221,27 +223,27 @@ APIENTRY DWORD midMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar
|
|||
|
||||
APIENTRY DWORD modMessage(DWORD ID, DWORD Message, DWORD User, DWORD Param1, DWORD Param2)
|
||||
{
|
||||
printf("modMessage\n");
|
||||
DPRINT("modMessage\n");
|
||||
|
||||
switch(Message)
|
||||
{
|
||||
case MODM_GETNUMDEVS:
|
||||
printf("MODM_GETNUMDEVS == %d\n", (int)GetDeviceCount(MidiOutDevice));
|
||||
DPRINT("MODM_GETNUMDEVS == %d\n", (int)GetDeviceCount(MidiOutDevice));
|
||||
return GetDeviceCount(MidiOutDevice);
|
||||
|
||||
case MODM_GETDEVCAPS:
|
||||
printf("MODM_GETDEVCAPS");
|
||||
DPRINT("MODM_GETDEVCAPS");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case MODM_OPEN :
|
||||
return OpenMidiDevice(MidiOutDevice, ID, User, Param1, Param2);
|
||||
|
||||
case MODM_CLOSE:
|
||||
printf("MODM_CLOSE");
|
||||
DPRINT("MODM_CLOSE");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case MODM_DATA:
|
||||
printf("MODM_DATA");
|
||||
DPRINT("MODM_DATA");
|
||||
|
||||
int i;
|
||||
BYTE b[4];
|
||||
|
@ -253,27 +255,27 @@ APIENTRY DWORD modMessage(DWORD ID, DWORD Message, DWORD User, DWORD Param1, DWO
|
|||
(PMIDIALLOC)User);
|
||||
|
||||
case MODM_LONGDATA:
|
||||
printf("MODM_LONGDATA");
|
||||
DPRINT("MODM_LONGDATA");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case MODM_RESET:
|
||||
printf("MODM_RESET");
|
||||
DPRINT("MODM_RESET");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case MODM_SETVOLUME:
|
||||
printf("MODM_SETVOLUME");
|
||||
DPRINT("MODM_SETVOLUME");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case MODM_GETVOLUME:
|
||||
printf("MODM_GETVOLUME");
|
||||
DPRINT("MODM_GETVOLUME");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case MODM_CACHEPATCHES:
|
||||
printf("MODM_CACHEPATCHES");
|
||||
DPRINT("MODM_CACHEPATCHES");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case MODM_CACHEDRUMPATCHES:
|
||||
printf("MODM_CACHEDRUMPATCHES");
|
||||
DPRINT("MODM_CACHEDRUMPATCHES");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
};
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
#include "mmdef.h"
|
||||
|
||||
ULONG DbgPrint(PCH Format, ...);
|
||||
|
||||
/*
|
||||
#define SOUND_MAX_DEVICE_NAME 1024 // GUESSWORK
|
||||
#define SOUND_MAX_DEVICES 256 // GUESSWORK
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "mmdrv.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
typedef struct _DEVICE_LIST
|
||||
{
|
||||
|
@ -59,7 +61,7 @@ DWORD TranslateStatus(void)
|
|||
MMRESULT OpenDevice(UINT DeviceType, DWORD ID, PHANDLE pDeviceHandle,
|
||||
DWORD Access)
|
||||
{
|
||||
printf("OpenDevice()\n");
|
||||
DPRINT("OpenDevice()\n");
|
||||
WCHAR DeviceName[SOUND_MAX_DEVICE_NAME];
|
||||
*pDeviceHandle = INVALID_HANDLE_VALUE;
|
||||
|
||||
|
@ -84,13 +86,13 @@ MMRESULT OpenDevice(UINT DeviceType, DWORD ID, PHANDLE pDeviceHandle,
|
|||
wsprintf(DeviceName, L"\\\\.%ls%d", AUX_DEVICE_NAME_U + strlen("\\Device"), ID);
|
||||
};
|
||||
|
||||
printf("Attempting to open %S\n", DeviceName);
|
||||
DPRINT("Attempting to open %S\n", DeviceName);
|
||||
|
||||
*pDeviceHandle = CreateFile(DeviceName, Access, FILE_SHARE_WRITE, NULL,
|
||||
OPEN_EXISTING, Access != GENERIC_READ ? FILE_FLAG_OVERLAPPED : 0,
|
||||
NULL);
|
||||
|
||||
printf("DeviceHandle == 0x%x\n", (int)*pDeviceHandle);
|
||||
DPRINT("DeviceHandle == 0x%x\n", (int)*pDeviceHandle);
|
||||
|
||||
if (pDeviceHandle == INVALID_HANDLE_VALUE)
|
||||
return TranslateStatus();
|
||||
|
@ -107,7 +109,7 @@ BOOL AddDeviceToList(PDEVICE_LIST* pList, DWORD DeviceType, DWORD CardIndex,
|
|||
{
|
||||
PDEVICE_LIST pNewDevice;
|
||||
|
||||
printf("AddDeviceToList()\n");
|
||||
DPRINT("AddDeviceToList()\n");
|
||||
|
||||
pNewDevice = (PDEVICE_LIST) HeapAlloc(Heap, 0,
|
||||
sizeof(DEVICE_LIST) + lstrlen(Name) * sizeof(WCHAR));
|
||||
|
@ -125,7 +127,7 @@ BOOL AddDeviceToList(PDEVICE_LIST* pList, DWORD DeviceType, DWORD CardIndex,
|
|||
pNewDevice->Next = *pList;
|
||||
*pList = pNewDevice;
|
||||
|
||||
printf("Success!\n");
|
||||
DPRINT("Success!\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -135,7 +137,7 @@ VOID FreeDeviceList()
|
|||
{
|
||||
PDEVICE_LIST pDevice;
|
||||
|
||||
printf("FreeDeviceList()\n");
|
||||
DPRINT("FreeDeviceList()\n");
|
||||
|
||||
while (DeviceList)
|
||||
{
|
||||
|
@ -155,7 +157,7 @@ MMRESULT FindDevices()
|
|||
// DWORD Index;
|
||||
// HKEY DriverKey;
|
||||
|
||||
printf("Finding devices\n");
|
||||
DPRINT("Finding devices\n");
|
||||
|
||||
// DriverKey = OpenParametersKey();
|
||||
// see drvutil.c of MS DDK for how this SHOULD be done...
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
#include "mmdrv.h"
|
||||
#include "wave.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* ============================
|
||||
* INTERNAL
|
||||
* functions start here
|
||||
|
@ -144,23 +147,23 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar
|
|||
{
|
||||
switch (dwMessage) {
|
||||
case WODM_GETNUMDEVS:
|
||||
printf("WODM_GETNUMDEVS");
|
||||
DPRINT("WODM_GETNUMDEVS");
|
||||
return GetDeviceCount(WaveOutDevice);
|
||||
|
||||
case WODM_GETDEVCAPS:
|
||||
printf("WODM_GETDEVCAPS");
|
||||
DPRINT("WODM_GETDEVCAPS");
|
||||
return GetDeviceCapabilities(dwId, WaveOutDevice, (LPBYTE)dwParam1,
|
||||
(DWORD)dwParam2);
|
||||
|
||||
case WODM_OPEN:
|
||||
printf("WODM_OPEN");
|
||||
DPRINT("WODM_OPEN");
|
||||
return OpenWaveDevice(WaveOutDevice, dwId, dwUser, dwParam1, dwParam2);
|
||||
|
||||
case WODM_CLOSE:
|
||||
{
|
||||
MMRESULT Result;
|
||||
PWAVEALLOC pTask = (PWAVEALLOC)dwUser;
|
||||
printf("WODM_CLOSE");
|
||||
DPRINT("WODM_CLOSE");
|
||||
|
||||
// 1. Check if the task is ready to complete
|
||||
Result = ThreadCallWaveDevice(WaveThreadClose, pTask);
|
||||
|
@ -186,7 +189,7 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar
|
|||
{
|
||||
LPWAVEHDR pWaveHdr = (LPWAVEHDR)dwParam1;
|
||||
|
||||
printf("WODM_WRITE");
|
||||
DPRINT("WODM_WRITE");
|
||||
|
||||
if (dwParam1 != 0)
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
@ -215,37 +218,37 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar
|
|||
|
||||
|
||||
case WODM_PAUSE:
|
||||
printf("WODM_PAUSE");
|
||||
DPRINT("WODM_PAUSE");
|
||||
((PWAVEALLOC)dwUser)->AuxParam.State = WAVE_DD_STOP;
|
||||
return ThreadCallWaveDevice(WaveThreadSetState, (PWAVEALLOC)dwUser);
|
||||
|
||||
case WODM_RESTART:
|
||||
printf("WODM_RESTART");
|
||||
DPRINT("WODM_RESTART");
|
||||
((PWAVEALLOC)dwUser)->AuxParam.State = WAVE_DD_PLAY;
|
||||
return ThreadCallWaveDevice(WaveThreadSetState, (PWAVEALLOC)dwUser);
|
||||
|
||||
case WODM_RESET:
|
||||
printf("WODM_RESET");
|
||||
DPRINT("WODM_RESET");
|
||||
((PWAVEALLOC)dwUser)->AuxParam.State = WAVE_DD_RESET;
|
||||
return ThreadCallWaveDevice(WaveThreadSetState, (PWAVEALLOC)dwUser);
|
||||
|
||||
case WODM_BREAKLOOP:
|
||||
printf("WODM_BREAKLOOP");
|
||||
DPRINT("WODM_BREAKLOOP");
|
||||
return ThreadCallWaveDevice(WaveThreadBreakLoop, (PWAVEALLOC)dwUser);
|
||||
|
||||
case WODM_GETPOS:
|
||||
printf("WODM_GETPOS");
|
||||
DPRINT("WODM_GETPOS");
|
||||
return GetPositionWaveDevice(((PWAVEALLOC)dwUser), (LPMMTIME)dwParam1, dwParam2);
|
||||
|
||||
case WODM_SETPITCH:
|
||||
printf("WODM_SETPITCH");
|
||||
DPRINT("WODM_SETPITCH");
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)&dwParam1;
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD);
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_SET_PITCH;
|
||||
return ThreadCallWaveDevice(WaveThreadSetData, ((PWAVEALLOC)dwUser));
|
||||
|
||||
case WODM_SETVOLUME:
|
||||
printf("WODM_SETVOLUME");
|
||||
DPRINT("WODM_SETVOLUME");
|
||||
{
|
||||
WAVE_DD_VOLUME Vol;
|
||||
Vol.Left = LOWORD(dwParam1) << 16;
|
||||
|
@ -256,21 +259,21 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar
|
|||
}
|
||||
|
||||
case WODM_SETPLAYBACKRATE:
|
||||
printf("WODM_SETPLAYBACKRATE");
|
||||
DPRINT("WODM_SETPLAYBACKRATE");
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)&dwParam1;
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD);
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_SET_PLAYBACK_RATE;
|
||||
return ThreadCallWaveDevice(WaveThreadSetData, (PWAVEALLOC)dwUser);
|
||||
|
||||
case WODM_GETPITCH:
|
||||
printf("WODM_GETPITCH");
|
||||
DPRINT("WODM_GETPITCH");
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)dwParam1;
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD);
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_GET_PITCH;
|
||||
return ThreadCallWaveDevice(WaveThreadGetData, (PWAVEALLOC)dwUser);
|
||||
|
||||
case WODM_GETVOLUME:
|
||||
printf("WODM_GETVOLUME");
|
||||
DPRINT("WODM_GETVOLUME");
|
||||
{
|
||||
WAVE_DD_VOLUME Vol;
|
||||
DWORD res;
|
||||
|
@ -285,7 +288,7 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar
|
|||
}
|
||||
|
||||
case WODM_GETPLAYBACKRATE:
|
||||
printf("WODM_GETPLAYBACKRATE");
|
||||
DPRINT("WODM_GETPLAYBACKRATE");
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)dwParam1;
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD);
|
||||
((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_GET_PLAYBACK_RATE;
|
||||
|
@ -305,7 +308,7 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar
|
|||
*/
|
||||
APIENTRY DWORD widMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
printf("widMessage\n");
|
||||
DPRINT("widMessage\n");
|
||||
|
||||
switch (dwMessage) {
|
||||
case WIDM_GETNUMDEVS:
|
||||
|
|
Loading…
Reference in a new issue