Author: silverblade
Date: Fri Jul 11 19:49:34 2008
New Revision: 34432
URL:
http://svn.reactos.org/svn/reactos?rev=34432&view=rev
Log:
Having changed all the code to use DPRINT and subsequently DbgPrint, it
transpires that Win NT4 does not support the use of these functions in
user-mode, rendering them pretty much useless to me. Reverted to spewing
out macro'd printfs instead, so it shouldn't be hard to change the
debug output method when these components finally make it over to ReactOS.
Modified:
branches/silverblade-audio/dll/win32/mmdrv/testing.c
branches/silverblade-audio/dll/win32/sndblst/sndblst.c
branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h
branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c
branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c
Modified: branches/silverblade-audio/dll/win32/mmdrv/testing.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/dll/win32/mmd…
==============================================================================
--- branches/silverblade-audio/dll/win32/mmdrv/testing.c [iso-8859-1] (original)
+++ branches/silverblade-audio/dll/win32/mmdrv/testing.c [iso-8859-1] Fri Jul 11 19:49:34
2008
@@ -17,7 +17,6 @@
#include <mmsystem.h>
#include <mmddk.h>
#include <ntddsnd.h>
-#include <debug.h>
#include <ntddk.h>
#include <mmebuddy.h>
@@ -212,11 +211,11 @@
/* Report the number of wave output devices */
NumWaveOuts = wodMessage(0, WODM_GETNUMDEVS, 0, 0, 0);
- DPRINT("Wave outs = %d\n", NumWaveOuts);
+ TRACE_("Wave outs = %d\n", (int) NumWaveOuts);
if ( NumWaveOuts < 1 )
{
- DPRINT("Nothing to do as no waveout devices!");
+ WARN_("Nothing to do as no waveout devices!");
return;
}
Modified: branches/silverblade-audio/dll/win32/sndblst/sndblst.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/dll/win32/snd…
==============================================================================
--- branches/silverblade-audio/dll/win32/sndblst/sndblst.c [iso-8859-1] (original)
+++ branches/silverblade-audio/dll/win32/sndblst/sndblst.c [iso-8859-1] Fri Jul 11
19:49:34 2008
@@ -16,8 +16,7 @@
#include <ntddsnd.h>
#include <mmddk.h>
#include <mmebuddy.h>
-#include <debug.h>
-
+//#include <debug.h>
PWSTR SBWaveOutDeviceName = L"Sound Blaster Playback";
PWSTR SBWaveInDeviceName = L"Sound Blaster Recording";
@@ -90,7 +89,7 @@
switch ( message )
{
case DRV_LOAD :
- DPRINT("DRV_LOAD");
+ TRACE_("DRV_LOAD");
EnumerateNt4ServiceSoundDevices(L"sndblst",
0,
@@ -102,14 +101,14 @@
return 1L;
case DRV_FREE :
- DPRINT("DRV_FREE");
+ TRACE_("DRV_FREE");
StopSoundThread();
RemoveAllSoundDevices();
// SOUND_DEBUG_HEX(GetMemoryAllocations());
- DPRINT("Leaving driver with %d memory allocations present\n",
GetMemoryAllocations());
+ TRACE_("Leaving driver with %d memory allocations present\n", (int)
GetMemoryAllocations());
return 1L;
Modified: branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/include/react…
==============================================================================
--- branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1]
(original)
+++ branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] Fri Jul
11 19:49:34 2008
@@ -24,6 +24,45 @@
#define POPUP(msg) \
MessageBoxA(0, msg, __FUNCTION__, MB_OK | MB_TASKMODAL)
+
+
+#ifndef NDEBUG
+
+#ifdef ASSERT
+ #undef ASSERT
+#endif
+
+/* HACK for testing */
+#include <stdio.h>
+
+#define TRACE_(...) \
+ { \
+ printf(" %s: ", __FUNCTION__); \
+ printf(__VA_ARGS__); \
+ }
+
+#define WARN_(...) \
+ { \
+ printf("o %s: ", __FUNCTION__); \
+ printf(__VA_ARGS__); \
+ }
+
+#define ERR_(...) \
+ { \
+ printf("X %s: ", __FUNCTION__); \
+ printf(__VA_ARGS__); \
+ }
+
+#define ASSERT(x) \
+ { \
+ if ( ! (x) ) \
+ { \
+ ERR_("ASSERT failed! %s\n", #x); \
+ exit(1); \
+ } \
+ }
+
+#endif
/*
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] Fri Jul
11 19:49:34 2008
@@ -23,7 +23,6 @@
#include <windows.h>
#include <ntddsnd.h>
-#include <debug.h>
#include <mmebuddy.h>
@@ -79,7 +78,7 @@
PSOUND_DEVICE NewDevice;
UCHAR TypeIndex;
- DPRINT("Adding a sound device to list %d\n", DeviceType);
+ TRACE_("Adding a sound device to list %d\n", DeviceType);
if ( ! VALID_SOUND_DEVICE_TYPE(DeviceType) )
{
@@ -126,14 +125,14 @@
/* Start or add to list */
if ( ! SoundDeviceLists[TypeIndex] )
{
- DPRINT("Starting device list\n");
+ TRACE_("Starting device list\n");
SoundDeviceLists[TypeIndex] = NewDevice;
}
else
{
PSOUND_DEVICE CurrentDevice = SoundDeviceLists[TypeIndex];
- DPRINT("Adding to device list\n");
+ TRACE_("Adding to device list\n");
while ( CurrentDevice != NULL )
{
@@ -148,7 +147,7 @@
}
++ SoundDeviceTotals[TypeIndex];
- DPRINT("Now %d devices of type %d\n", SoundDeviceTotals[TypeIndex],
DeviceType);
+ TRACE_("Now %d devices of type %d\n", (int) SoundDeviceTotals[TypeIndex],
DeviceType);
return TRUE;
}
@@ -162,7 +161,7 @@
PSOUND_DEVICE CurrentDevice = NULL;
PSOUND_DEVICE PreviousDevice = NULL;
- /*DPRINT("Removing a sound device from list %d\n", DeviceType);*/
+ /*TRACE_("Removing a sound device from list %d\n", DeviceType);*/
if ( ! SoundDevice )
return MMSYSERR_INVALPARAM;
@@ -221,11 +220,11 @@
{
PSOUND_DEVICE CurrentDevice;
- DPRINT("Emptying device list for device type %d\n", DeviceType);
+ TRACE_("Emptying device list for device type %d\n", DeviceType);
if ( ! VALID_SOUND_DEVICE_TYPE(DeviceType) )
{
- DPRINT("Invalid device type - %d\n", DeviceType);
+ ERR_("Invalid device type - %d\n", DeviceType);
return MMSYSERR_INVALPARAM;
}
@@ -252,7 +251,7 @@
{
ULONG i;
- DPRINT("Emptying all device lists\n");
+ TRACE_("Emptying all device lists\n");
for ( i = MIN_SOUND_DEVICE_TYPE; i <= MAX_SOUND_DEVICE_TYPE; ++ i )
{
@@ -526,7 +525,7 @@
DWORD AccessRights = GENERIC_READ;
MMRESULT Result;
- DPRINT("Default instance ctor");
+ TRACE_("Default instance ctor");
ASSERT(SoundDeviceInstance != NULL);
GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice);
@@ -547,7 +546,7 @@
if ( Result != MMSYSERR_NOERROR )
return Result;
- DPRINT("Returning from default ctor");
+ TRACE_("Returning from default ctor");
return MMSYSERR_NOERROR;
}
@@ -560,7 +559,7 @@
PSOUND_DEVICE SoundDevice;
MMRESULT Result;
- DPRINT("Default instance dtor");
+ TRACE_("Default instance dtor");
ASSERT(SoundDeviceInstance);
GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice);
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1] Fri Jul
11 19:49:34 2008
@@ -15,7 +15,6 @@
#include <windows.h>
#include <ntddsnd.h>
-#include <debug.h>
#include <mmebuddy.h>
@@ -161,9 +160,9 @@
Result = SoundDevice->Functions.Constructor(CreatedInstance);
if ( Result != MMSYSERR_NOERROR )
{
- DPRINT("Custom ctor returned failure - unlisting");
+ ERR_("Custom ctor returned failure - unlisting");
UnlistSoundDeviceInstance(CreatedInstance);
- DPRINT("Freeing");
+ TRACE_("Freeing");
FreeSoundDeviceInstance(CreatedInstance);
CreatedInstance = NULL;
//DestroySoundDeviceInstance(CreatedInstance);
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c [iso-8859-1] Fri Jul 11
19:49:34 2008
@@ -15,7 +15,6 @@
#include <windows.h>
#include <mmsystem.h>
#include <ntddsnd.h>
-#include <debug.h>
#include <mmebuddy.h>
@@ -30,13 +29,13 @@
if ( ! Handle )
{
- DPRINT("No handle ptr\n");
+ ERR_("No handle ptr\n");
return MMSYSERR_INVALPARAM;
}
if ( ! DeviceName )
{
- DPRINT("No device name\n");
+ ERR_("No device name\n");
return MMSYSERR_INVALPARAM;
}
@@ -45,7 +44,7 @@
OpenFlags = FILE_FLAG_OVERLAPPED;
}
- DPRINT("Attempting to open '%s'\n", DeviceName);
+ /*TRACE_("Attempting to open '%ws'\n", DeviceName);*/
*Handle = CreateFile(DeviceName,
AccessRights,
@@ -57,7 +56,7 @@
if ( *Handle == INVALID_HANDLE_VALUE )
{
- DPRINT("Failed to open\n");
+ ERR_("Failed to open\n");
return Win32ErrorToMmResult(GetLastError());
}
@@ -73,13 +72,13 @@
if ( ! SoundDevice )
{
- DPRINT("No sound device specified");
+ ERR_("No sound device specified");
return MMSYSERR_INVALPARAM;
}
if ( SoundDevice->Handle != INVALID_HANDLE_VALUE )
{
- DPRINT("Already open?");
+ ERR_("Already open?");
return MMSYSERR_ERROR; /*MMSYSERR_ALLOC;*/
}
@@ -217,14 +216,14 @@
{
if ( ( ! SoundDeviceInstance ) || ( ! Buffer ) || ( BufferSize == 0 ) )
{
- DPRINT("Invalid parameter in WriteSoundDeviceBuffer!\n");
+ ERR_("Invalid parameter in WriteSoundDeviceBuffer!\n");
return MMSYSERR_INVALPARAM;
}
/*wsprintf(msg, L"Writing to handle %x",
SoundDeviceInstance->Device->Handle);*/
/*SOUND_DEBUG(msg);*/
- DPRINT("WriteFileEx(%p, %p, %d, %p, %p)\n",
+ TRACE_("WriteFileEx(%p, %p, %d, %p, %p)\n",
SoundDeviceInstance->Device->Handle,
Buffer,
(int) BufferSize,
@@ -237,7 +236,7 @@
Overlapped,
CompletionRoutine) )
{
- DPRINT("WriteFileEx -- Win32 Error %d", GetLastError());
+ ERR_("WriteFileEx -- Win32 Error %d", (int) GetLastError());
return Win32ErrorToMmResult(GetLastError());
}
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c [iso-8859-1]
Fri Jul 11 19:49:34 2008
@@ -15,7 +15,8 @@
#include <windows.h>
#include <mmsystem.h>
#include <mmddk.h>
-#include <debug.h>
+
+#include <mmebuddy.h>
APIENTRY DWORD
auxMessage(
@@ -25,7 +26,7 @@
DWORD parameter1,
DWORD parameter2)
{
- DPRINT("auxMessageStub called\n");
+ TRACE_("auxMessageStub called\n");
/* TODO */
return MMSYSERR_NOTSUPPORTED;
}
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c [iso-8859-1]
Fri Jul 11 19:49:34 2008
@@ -15,7 +15,8 @@
#include <windows.h>
#include <mmsystem.h>
#include <mmddk.h>
-#include <debug.h>
+
+#include <mmebuddy.h>
APIENTRY DWORD
midMessage(
@@ -25,7 +26,7 @@
DWORD parameter1,
DWORD parameter2)
{
- DPRINT("midMessageStub called\n");
+ TRACE_("midMessageStub called\n");
switch ( message )
{
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c [iso-8859-1]
Fri Jul 11 19:49:34 2008
@@ -15,7 +15,8 @@
#include <windows.h>
#include <mmsystem.h>
#include <mmddk.h>
-#include <debug.h>
+
+#include <mmebuddy.h>
APIENTRY DWORD
modMessage(
@@ -25,7 +26,7 @@
DWORD parameter1,
DWORD parameter2)
{
- DPRINT("modMessageStub called\n");
+ TRACE_("modMessageStub called\n");
switch ( message )
{
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c [iso-8859-1]
Fri Jul 11 19:49:34 2008
@@ -15,7 +15,8 @@
#include <windows.h>
#include <mmsystem.h>
#include <mmddk.h>
-#include <debug.h>
+
+#include <mmebuddy.h>
APIENTRY DWORD
mxdMessage(
@@ -25,7 +26,7 @@
DWORD parameter1,
DWORD parameter2)
{
- DPRINT("mxdMessageStub called\n");
+ TRACE_("mxdMessageStub called\n");
/* TODO */
return MMSYSERR_NOTSUPPORTED;
}
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c [iso-8859-1]
Fri Jul 11 19:49:34 2008
@@ -15,7 +15,6 @@
#include <windows.h>
#include <mmsystem.h>
#include <mmddk.h>
-#include <debug.h>
#include <ntddsnd.h>
#include <mmebuddy.h>
@@ -28,7 +27,7 @@
DWORD parameter1,
DWORD parameter2)
{
- DPRINT("widMessageStub called\n");
+ TRACE_("widMessageStub called\n");
switch ( message )
{
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c [iso-8859-1]
Fri Jul 11 19:49:34 2008
@@ -15,7 +15,6 @@
#include <windows.h>
#include <mmsystem.h>
#include <mmddk.h>
-#include <debug.h>
#include <ntddsnd.h>
#include <mmebuddy.h>
@@ -33,7 +32,7 @@
PSOUND_DEVICE_INSTANCE Instance =
(PSOUND_DEVICE_INSTANCE)private_handle;
- DPRINT("wodMessageStub called\n");
+ TRACE_("wodMessageStub called\n");
switch ( message )
{
@@ -64,7 +63,7 @@
{
WAVEOPENDESC* OpenParameters = (WAVEOPENDESC*) parameter1;
- DPRINT("In WODM_OPEN\n");
+ TRACE_("In WODM_OPEN\n");
Result = GetSoundDevice(WAVE_OUT_DEVICE_TYPE, device_id, &Device);
if ( Result != MMSYSERR_NOERROR )
return Result;
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] (original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] Fri Jul 11
19:49:34 2008
@@ -20,7 +20,6 @@
#include <windows.h>
#include <mmsystem.h>
#include <ntddsnd.h>
-#include <debug.h>
#include <mmebuddy.h>
@@ -289,7 +288,7 @@
HANDLE DeviceHandle;
BOOLEAN DoSearch = TRUE;
- DPRINT("Detecting NT4 style sound devices of type %d\n", DeviceType);
+ TRACE_("Detecting NT4 style sound devices of type %d\n", DeviceType);
if ( ! VALID_SOUND_DEVICE_TYPE(DeviceType) )
{
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1] Fri Jul 11
19:49:34 2008
@@ -18,8 +18,6 @@
#include <windows.h>
#include <mmsystem.h>
-#include <debug.h>
-
#include <mmebuddy.h>
static BOOLEAN ThreadRunning = FALSE;
@@ -52,7 +50,7 @@
PSOUND_THREAD_COMPLETED_IO CompletionData;
PSOUND_THREAD_OVERLAPPED SoundOverlapped;
- DPRINT("** I/O has completed\n");
+ TRACE_("** I/O has completed\n");
SoundOverlapped = (PSOUND_THREAD_OVERLAPPED) lpOverlapped;
ASSERT(SoundOverlapped);
@@ -65,9 +63,9 @@
/* Is this the first completion? */
if ( ! CompletedIoListHead )
{
- DPRINT("First completion - making new head and tail\n");
+ TRACE_("First completion - making new head and tail\n");
/* This is the first completion */
- ASSERT(CompletedIoListTail);
+ ASSERT(! CompletedIoListTail);
CompletionData->Previous = NULL;
CompletionData->Next = NULL;
@@ -77,7 +75,7 @@
}
else
{
- DPRINT("Not the first completion - making new tail\n");
+ TRACE_("Not the first completion - making new tail\n");
ASSERT(CompletionData);
/* This is not the first completion */
CompletionData->Previous = CompletedIoListTail;
@@ -92,7 +90,7 @@
/* We keep the completion data, but no longer need this: */
FreeMemory(SoundOverlapped);
- DPRINT("** Leaving completion routine\n");
+ TRACE_("** Leaving completion routine\n");
}
MMRESULT
@@ -138,7 +136,7 @@
Overlapped->CompletionData->Parameter = CompletionParameter;
Overlapped->CompletionData->BytesTransferred = 0;
- DPRINT("Performing overlapped I/O\n");
+ TRACE_("Performing overlapped I/O\n");
return WriteSoundDeviceBuffer(SoundDeviceInstance,
Buffer,
BufferSize,
@@ -151,7 +149,7 @@
IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance OPTIONAL,
IN PVOID Parameter OPTIONAL)
{
- DPRINT("ProcessThreadExitRequest called\n");
+ TRACE_("ProcessThreadExitRequest called\n");
ThreadRunning = FALSE;
return MMSYSERR_NOERROR;
}
@@ -198,24 +196,24 @@
PSOUND_THREAD_COMPLETED_IO CurrentCompletion;
/* Process the I/O Completion */
- DPRINT("Returned from I/O completion APC\n");
+ TRACE_("Returned from I/O completion APC\n");
CurrentCompletion = CompletedIoListHead;
ASSERT(CurrentCompletion);
- DPRINT("Beginning enumeration of completions\n");
+ TRACE_("Beginning enumeration of completions\n");
while ( CurrentCompletion )
{
PSOUND_THREAD_COMPLETED_IO PreviousCompletion;
- DPRINT("Calling completion handler\n");
+ TRACE_("Calling completion handler\n");
/* Call the completion handler */
CurrentCompletion->CompletionHandler(
CurrentCompletion->SoundDeviceInstance,
CurrentCompletion->Parameter,
CurrentCompletion->BytesTransferred);
- DPRINT("Advancing to next completion\n");
+ TRACE_("Advancing to next completion\n");
/* Get the next completion but destroy the previous */
PreviousCompletion = CurrentCompletion;
CurrentCompletion = CurrentCompletion->Next;
@@ -227,7 +225,7 @@
/* Nothing in the completion queue/list now */
CompletedIoListHead = NULL;
CompletedIoListTail = NULL;
- DPRINT("Ended enumeration of completions\n");
+ TRACE_("Ended enumeration of completions\n");
}
else
{
@@ -236,7 +234,7 @@
}
}
- DPRINT("THREAD: Exiting\n");
+ TRACE_("THREAD: Exiting\n");
ExitThread(0);
return 0;
@@ -321,7 +319,7 @@
return Win32ErrorToMmResult(GetLastError());
}
- DPRINT("Starting sound thread\n");
+ TRACE_("Starting sound thread\n");
/* We're all set to go, so let's start the thread up */
ResumeThread(SoundThread);
@@ -373,20 +371,20 @@
return MMSYSERR_ERROR;
}
- DPRINT("Calling thread shutdown function\n");
+ TRACE_("Calling thread shutdown function\n");
Result = CallUsingSoundThread(NULL,
ProcessThreadExitRequest,
NULL);
/* Our request didn't get processed? */
- ASSERT(Result != MMSYSERR_NOERROR);
+ ASSERT(Result == MMSYSERR_NOERROR);
if ( Result != MMSYSERR_NOERROR )
return Result;
WaitForSingleObject(SoundThread, INFINITE);
- DPRINT("Sound thread has quit\n");
+ TRACE_("Sound thread has quit\n");
/* Clean up */
CloseHandle(SoundThread);
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c [iso-8859-1] Fri Jul
11 19:49:34 2008
@@ -14,7 +14,6 @@
#include <windows.h>
#include <mmsystem.h>
-#include <debug.h>
#include <mmebuddy.h>
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c
URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
==============================================================================
--- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c [iso-8859-1]
(original)
+++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c [iso-8859-1]
Fri Jul 11 19:49:34 2008
@@ -18,7 +18,6 @@
#include <windows.h>
#include <mmsystem.h>
-#include <debug.h>
#include <mmebuddy.h>
@@ -65,7 +64,7 @@
PWAVE_STREAM_INFO StreamInfo;
DWORD BytesToStream, BytesStreamed = 0;
- DPRINT("PerformWaveIo\n");
+ TRACE_("PerformWaveIo\n");
ASSERT(SoundDeviceInstance);
@@ -74,7 +73,7 @@
/* If we're out of buffers, mark stream as stopped and do nothing */
if ( ! StreamInfo->CurrentBuffer )
{
- DPRINT("*** NOTHING TO DO ***\n");
+ TRACE_("*** NOTHING TO DO ***\n");
return 0;
}
@@ -83,9 +82,9 @@
StreamInfo->CurrentBuffer->reserved,
MAX_SOUND_BUFFER_SIZE);
- DPRINT("About to report what I'm about to write...\n");
-
- DPRINT("Writing %p + %d (%d bytes) - buffer length is %d bytes\n",
+ TRACE_("About to report what I'm about to write...\n");
+
+ TRACE_("Writing %p + %d (%d bytes) - buffer length is %d bytes\n",
StreamInfo->CurrentBuffer->lpData,
(int) StreamInfo->CurrentBuffer->reserved,
(int) BytesToStream,
@@ -109,7 +108,7 @@
if ( StreamInfo->CurrentBuffer->reserved ==
StreamInfo->CurrentBuffer->dwBufferLength )
{
- DPRINT("Advancing to next buffer\n");
+ TRACE_("Advancing to next buffer\n");
StreamInfo->CurrentBuffer = StreamInfo->CurrentBuffer->lpNext;
}
@@ -128,14 +127,14 @@
StreamInfo = &SoundDeviceInstance->Streaming.Wave;
- DPRINT("<== Streaming wave I/O ==>\n");
+ TRACE_("<== Streaming wave I/O ==>\n");
while ( StreamReadyForData(StreamInfo) &&
StreamHasBuffersQueued(StreamInfo) )
{
- DPRINT("Performing wave I/O ...\n");
+ TRACE_("Performing wave I/O ...\n");
PerformWaveIo(SoundDeviceInstance);
}
- DPRINT("<== Done streaming ==>\n");
+ TRACE_("<== Done streaming ==>\n");
return MMSYSERR_NOERROR;
}
@@ -148,7 +147,7 @@
{
PWAVE_STREAM_INFO StreamInfo;
- DPRINT("CompleteWaveBuffer(%p, %p, %d)\n",
+ TRACE_("CompleteWaveBuffer(%p, %p, %d)\n",
SoundDeviceInstance,
Parameter,
(int) BytesWritten);
@@ -163,7 +162,7 @@
PerformWaveIo(SoundDeviceInstance);
- DPRINT("Wave completion routine done\n");
+ TRACE_("Wave completion routine done\n");
}
MMRESULT
@@ -183,7 +182,7 @@
/* To avoid stupidly long variable names we alias this */
StreamInfo = &SoundDeviceInstance->Streaming.Wave;
- DPRINT("QueueBuffer_Request\n");
+ TRACE_("QueueBuffer_Request\n");
/* Initialise fields of interest to us */
WaveHeader->lpNext = NULL;
@@ -195,7 +194,7 @@
*/
if ( ! StreamInfo->BufferQueueHead )
{
- DPRINT("This is the first buffer being queued\n");
+ TRACE_("This is the first buffer being queued\n");
/* Set head, tail and current to this buffer */
StreamInfo->BufferQueueHead = WaveHeader;
@@ -212,7 +211,7 @@
}
else
{
- DPRINT("This is not the first buffer being queued\n");
+ TRACE_("This is not the first buffer being queued\n");
/* Point the existing tail to the new buffer */
StreamInfo->BufferQueueTail->lpNext = WaveHeader;