Author: akhaldi
Date: Sat Nov 14 16:19:07 2015
New Revision: 69888
URL:
http://svn.reactos.org/svn/reactos?rev=69888&view=rev
Log:
[INCLUDE/REACTOS] Move the debug macros from mmebuddy.h to mmebuddy_debug.h.
[SNDBLST][MMENT4][MMEBUDDY] Use mmebuddy_debug.h where needed. [WDMAUD.DRV] Enable PCH
again and use mmebuddy_debug.h where needed.
Added:
trunk/reactos/include/reactos/libs/sound/mmebuddy_debug.h (with props)
Modified:
trunk/reactos/dll/win32/sndblst/sndblst.c
trunk/reactos/dll/win32/wdmaud.drv/CMakeLists.txt
trunk/reactos/dll/win32/wdmaud.drv/legacy.c
trunk/reactos/dll/win32/wdmaud.drv/mixer.c
trunk/reactos/dll/win32/wdmaud.drv/mmixer.c
trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c
trunk/reactos/include/reactos/libs/sound/mmebuddy.h
trunk/reactos/lib/drivers/sound/mmebuddy/precomp.h
trunk/reactos/lib/drivers/sound/mment4/control.c
trunk/reactos/lib/drivers/sound/mment4/detect.c
trunk/reactos/lib/drivers/sound/mment4/registry.c
Modified: trunk/reactos/dll/win32/sndblst/sndblst.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sndblst/sndblst.…
==============================================================================
--- trunk/reactos/dll/win32/sndblst/sndblst.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/sndblst/sndblst.c [iso-8859-1] Sat Nov 14 16:19:07 2015
@@ -26,6 +26,7 @@
#include <mmddk.h>
#include <mmebuddy.h>
#include <mment4.h>
+#include <mmebuddy_debug.h>
//#include <debug.h>
/* TODO: Give individual device names if someone has > 1 card */
Modified: trunk/reactos/dll/win32/wdmaud.drv/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/CMake…
==============================================================================
--- trunk/reactos/dll/win32/wdmaud.drv/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wdmaud.drv/CMakeLists.txt [iso-8859-1] Sat Nov 14 16:19:07
2015
@@ -28,6 +28,5 @@
endif()
add_importlibs(wdmaud.drv user32 winmm advapi32 msvcrt setupapi ksuser kernel32 ntdll)
-# FIXME: Address mmebuddy.h reliance on NDEBUG
-#add_pch(wdmaud.drv wdmaud.h SOURCE)
+add_pch(wdmaud.drv wdmaud.h SOURCE)
add_cd_file(TARGET wdmaud.drv DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/win32/wdmaud.drv/legacy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/legac…
==============================================================================
--- trunk/reactos/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] Sat Nov 14 16:19:07 2015
@@ -13,9 +13,11 @@
*
*/
+#include "wdmaud.h"
+
#define NDEBUG
-#include "wdmaud.h"
#include <debug.h>
+#include <mmebuddy_debug.h>
#define KERNEL_DEVICE_NAME L"\\\\.\\wdmaud"
Modified: trunk/reactos/dll/win32/wdmaud.drv/mixer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/mixer…
==============================================================================
--- trunk/reactos/dll/win32/wdmaud.drv/mixer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wdmaud.drv/mixer.c [iso-8859-1] Sat Nov 14 16:19:07 2015
@@ -7,13 +7,14 @@
* PROGRAMMERS: Johannes Anderwald
*/
-#define NDEBUG
#include "wdmaud.h"
#include <samplerate.h>
#include <float_cast.h>
+#define NDEBUG
#include <debug.h>
+#include <mmebuddy_debug.h>
extern HANDLE KernelHandle;
Modified: trunk/reactos/dll/win32/wdmaud.drv/mmixer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/mmixe…
==============================================================================
--- trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] Sat Nov 14 16:19:07 2015
@@ -7,14 +7,15 @@
* PROGRAMMERS: Johannes Anderwald
*/
-#define NDEBUG
#include "wdmaud.h"
#include <winreg.h>
#include <setupapi.h>
#include <mmixer.h>
+#define NDEBUG
#include <debug.h>
+#include <mmebuddy_debug.h>
typedef struct
{
Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmau…
==============================================================================
--- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] Sat Nov 14 16:19:07 2015
@@ -12,10 +12,11 @@
*
*/
+#include "wdmaud.h"
+
#define NDEBUG
-#include "wdmaud.h"
-
#include <debug.h>
+#include <mmebuddy_debug.h>
#ifndef USE_MMIXER_LIB
#define FUNC_NAME(x) x##ByLegacy
Modified: trunk/reactos/include/reactos/libs/sound/mmebuddy.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/sound…
==============================================================================
--- trunk/reactos/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] Sat Nov 14 16:19:07
2015
@@ -21,69 +21,6 @@
#define ROS_AUDIO_MMEBUDDY_H
/*
- Hacky debug macro
-*/
-
-#define POPUP(...) \
- { \
- WCHAR dbg_popup_msg[1024], dbg_popup_title[256]; \
- wsprintf(dbg_popup_title, L"%hS(%d)", __FILE__, __LINE__); \
- wsprintf(dbg_popup_msg, __VA_ARGS__); \
- MessageBox(0, dbg_popup_msg, dbg_popup_title, MB_OK | MB_TASKMODAL); \
- }
-
-#ifndef NDEBUG
- #define SND_ERR(...) \
- { \
- WCHAR dbg_popup_msg[1024]; \
- wsprintf(dbg_popup_msg, __VA_ARGS__); \
- OutputDebugString(dbg_popup_msg); \
- }
- #define SND_WARN(...) \
- { \
- WCHAR dbg_popup_msg[1024]; \
- wsprintf(dbg_popup_msg, __VA_ARGS__); \
- OutputDebugString(dbg_popup_msg); \
- }
- #define SND_TRACE(...) \
- { \
- WCHAR dbg_popup_msg[1024]; \
- wsprintf(dbg_popup_msg, __VA_ARGS__); \
- OutputDebugString(dbg_popup_msg); \
- }
-
- #define SND_ASSERT(condition) \
- { \
- if ( ! ( condition ) ) \
- { \
- SND_ERR(L"ASSERT FAILED: %hS File %hS Line %u\n", #condition,
__FILE__, __LINE__); \
- POPUP(L"ASSERT FAILED: %hS\n", #condition); \
- ExitProcess(1); \
- } \
- }
-
- #define DUMP_WAVEHDR_QUEUE(sound_device_instance) \
- { \
- PWAVEHDR CurrDumpHdr = sound_device_instance->HeadWaveHeader; \
- SND_TRACE(L"-- Current wave header list --\n"); \
- while ( CurrDumpHdr ) \
- { \
- SND_TRACE(L"%x | %d bytes | flags: %x\n", CurrDumpHdr, \
- CurrDumpHdr->dwBufferLength, \
- CurrDumpHdr->dwFlags); \
- CurrDumpHdr = CurrDumpHdr->lpNext; \
- } \
- }
-
-#else
- #define SND_ERR(...) do {} while ( 0 )
- #define SND_WARN(...) do {} while ( 0 )
- #define SND_TRACE(...) do {} while ( 0 )
- #define SND_ASSERT(condition) do {(void)(condition);} while ( 0 )
- #define DUMP_WAVEHDR_QUEUE(condition) do {} while ( 0 )
-#endif
-
-/*
Some memory allocation helper macros
*/
Added: trunk/reactos/include/reactos/libs/sound/mmebuddy_debug.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/sound…
==============================================================================
--- trunk/reactos/include/reactos/libs/sound/mmebuddy_debug.h (added)
+++ trunk/reactos/include/reactos/libs/sound/mmebuddy_debug.h [iso-8859-1] Sat Nov 14
16:19:07 2015
@@ -0,0 +1,67 @@
+#ifndef ROS_AUDIO_MMEBUDDY_DEBUG_H
+#define ROS_AUDIO_MMEBUDDY_DEBUG_H
+
+/*
+ Hacky debug macro
+*/
+
+#define POPUP(...) \
+ { \
+ WCHAR dbg_popup_msg[1024], dbg_popup_title[256]; \
+ wsprintf(dbg_popup_title, L"%hS(%d)", __FILE__, __LINE__); \
+ wsprintf(dbg_popup_msg, __VA_ARGS__); \
+ MessageBox(0, dbg_popup_msg, dbg_popup_title, MB_OK | MB_TASKMODAL); \
+ }
+
+#ifndef NDEBUG
+ #define SND_ERR(...) \
+ { \
+ WCHAR dbg_popup_msg[1024]; \
+ wsprintf(dbg_popup_msg, __VA_ARGS__); \
+ OutputDebugString(dbg_popup_msg); \
+ }
+ #define SND_WARN(...) \
+ { \
+ WCHAR dbg_popup_msg[1024]; \
+ wsprintf(dbg_popup_msg, __VA_ARGS__); \
+ OutputDebugString(dbg_popup_msg); \
+ }
+ #define SND_TRACE(...) \
+ { \
+ WCHAR dbg_popup_msg[1024]; \
+ wsprintf(dbg_popup_msg, __VA_ARGS__); \
+ OutputDebugString(dbg_popup_msg); \
+ }
+
+ #define SND_ASSERT(condition) \
+ { \
+ if ( ! ( condition ) ) \
+ { \
+ SND_ERR(L"ASSERT FAILED: %hS File %hS Line %u\n", #condition,
__FILE__, __LINE__); \
+ POPUP(L"ASSERT FAILED: %hS\n", #condition); \
+ ExitProcess(1); \
+ } \
+ }
+
+ #define DUMP_WAVEHDR_QUEUE(sound_device_instance) \
+ { \
+ PWAVEHDR CurrDumpHdr = sound_device_instance->HeadWaveHeader; \
+ SND_TRACE(L"-- Current wave header list --\n"); \
+ while ( CurrDumpHdr ) \
+ { \
+ SND_TRACE(L"%x | %d bytes | flags: %x\n", CurrDumpHdr, \
+ CurrDumpHdr->dwBufferLength, \
+ CurrDumpHdr->dwFlags); \
+ CurrDumpHdr = CurrDumpHdr->lpNext; \
+ } \
+ }
+
+#else
+ #define SND_ERR(...) do {} while ( 0 )
+ #define SND_WARN(...) do {} while ( 0 )
+ #define SND_TRACE(...) do {} while ( 0 )
+ #define SND_ASSERT(condition) do {(void)(condition);} while ( 0 )
+ #define DUMP_WAVEHDR_QUEUE(condition) do {} while ( 0 )
+#endif
+
+#endif /* ROS_AUDIO_MMEBUDDY_DEBUG_H */
Propchange: trunk/reactos/include/reactos/libs/sound/mmebuddy_debug.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/lib/drivers/sound/mmebuddy/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmebuddy/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmebuddy/precomp.h [iso-8859-1] Sat Nov 14 16:19:07
2015
@@ -6,5 +6,6 @@
#include <mmddk.h>
#include <sndtypes.h>
#include <mmebuddy.h>
+#include <mmebuddy_debug.h>
#endif /* _MMEBUDDY_PCH_ */
Modified: trunk/reactos/lib/drivers/sound/mment4/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mment4/c…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mment4/control.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mment4/control.c [iso-8859-1] Sat Nov 14 16:19:07
2015
@@ -13,6 +13,8 @@
#include <winioctl.h>
#include <ntddsnd.h>
+#include <mmebuddy_debug.h>
+
/*
Convenience routine for getting the path of a device and opening it.
*/
Modified: trunk/reactos/lib/drivers/sound/mment4/detect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mment4/d…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mment4/detect.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mment4/detect.c [iso-8859-1] Sat Nov 14 16:19:07 2015
@@ -14,6 +14,7 @@
#include "precomp.h"
#include <mment4.h>
+#include <mmebuddy_debug.h>
/*
This is the "nice" way to discover audio devices in NT4 - go into the
Modified: trunk/reactos/lib/drivers/sound/mment4/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mment4/r…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mment4/registry.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mment4/registry.c [iso-8859-1] Sat Nov 14 16:19:07
2015
@@ -9,6 +9,8 @@
*/
#include "precomp.h"
+
+#include <mmebuddy_debug.h>
/*
Open the parameters key of a sound driver.