1#ifndef ROS_AUDIO_MMEBUDDY_DEBUG_H
2#define ROS_AUDIO_MMEBUDDY_DEBUG_H
10 WCHAR dbg_popup_msg[1024], dbg_popup_title[256]; \
11 wsprintf(dbg_popup_title, L"%hS(%d)", __FILE__, __LINE__); \
12 wsprintf(dbg_popup_msg, __VA_ARGS__); \
13 MessageBox(0, dbg_popup_msg, dbg_popup_title, MB_OK | MB_TASKMODAL); \
17 #define SND_ERR(...) \
19 WCHAR dbg_popup_msg[1024]; \
20 wsprintf(dbg_popup_msg, __VA_ARGS__); \
21 OutputDebugString(dbg_popup_msg); \
23 #define SND_WARN(...) \
25 WCHAR dbg_popup_msg[1024]; \
26 wsprintf(dbg_popup_msg, __VA_ARGS__); \
27 OutputDebugString(dbg_popup_msg); \
29 #define SND_TRACE(...) \
31 WCHAR dbg_popup_msg[1024]; \
32 wsprintf(dbg_popup_msg, __VA_ARGS__); \
33 OutputDebugString(dbg_popup_msg); \
36 #define SND_ASSERT(condition) \
38 if ( ! ( condition ) ) \
40 SND_ERR(L"ASSERT FAILED: %hS File %hS Line %u\n", #condition, __FILE__, __LINE__); \
41 POPUP(L"ASSERT FAILED: %hS\n", #condition); \
46 #define DUMP_WAVEHDR_QUEUE(sound_device_instance) \
48 PWAVEHDR CurrDumpHdr = sound_device_instance->HeadWaveHeader; \
49 SND_TRACE(L"-- Current wave header list --\n"); \
50 while ( CurrDumpHdr ) \
52 SND_TRACE(L"%x | %d bytes | flags: %x\n", CurrDumpHdr, \
53 CurrDumpHdr->dwBufferLength, \
54 CurrDumpHdr->dwFlags); \
55 CurrDumpHdr = CurrDumpHdr->lpNext; \
60 #define SND_ERR(...) do {} while ( 0 )
61 #define SND_WARN(...) do {} while ( 0 )
62 #define SND_TRACE(...) do {} while ( 0 )
63 #define SND_ASSERT(condition) do {(void)(condition);} while ( 0 )
64 #define DUMP_WAVEHDR_QUEUE(condition) do {} while ( 0 )