From 463d474cc7d874f4d3c9bfa93f195e62c6e7f1d5 Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Fri, 14 May 2004 04:54:54 +0000 Subject: [PATCH] Print human-readable capabilities flag. --- dlls/winmm/tests/wave.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c index 7585de34ff4..2bba403c82e 100644 --- a/dlls/winmm/tests/wave.c +++ b/dlls/winmm/tests/wave.c @@ -192,6 +192,23 @@ static const char * wave_open_flags(DWORD flags) return msg; } +static const char * wave_out_caps(DWORD dwSupport) +{ +#define ADD_FLAG(f) if (dwSupport & f) strcat(msg, " " #f) + static char msg[256]; + msg[0] = 0; + + ADD_FLAG(WAVECAPS_PITCH); + ADD_FLAG(WAVECAPS_PLAYBACKRATE); + ADD_FLAG(WAVECAPS_VOLUME); + ADD_FLAG(WAVECAPS_LRVOLUME); + ADD_FLAG(WAVECAPS_SYNC); + ADD_FLAG(WAVECAPS_SAMPLEACCURATE); + + return msg[0] ? msg + 1 : ""; +#undef FLAG +} + static void wave_out_test_deviceOut(int device, int format, DWORD flags, LPWAVEOUTCAPS pcaps) { WAVEFORMATEX wfx; @@ -334,11 +351,11 @@ static void wave_out_tests() name=strdup("not supported"); } - trace(" %d: \"%s\" (%s) %d.%d (%d:%d): channels=%d formats=%05lx support=%04lx\n", + trace(" %d: \"%s\" (%s) %d.%d (%d:%d): channels=%d formats=%05lx support=%04lx(%s)\n", d,caps.szPname,(name?name:"failed"),caps.vDriverVersion >> 8, caps.vDriverVersion & 0xff, caps.wMid,caps.wPid, - caps.wChannels,caps.dwFormats,caps.dwSupport); + caps.wChannels,caps.dwFormats,caps.dwSupport,wave_out_caps(caps.dwSupport)); free(name); for (f=0;f