winecoreaudio.drv: Use wine_dbg_sprintf() in a few debug utility functions.

This commit is contained in:
Henri Verbeet 2009-11-30 10:22:11 +01:00 committed by Alexandre Julliard
parent 3be325040c
commit c369f33893
2 changed files with 5 additions and 15 deletions

View File

@ -264,7 +264,6 @@ OSStatus CoreAudio_wiAudioUnitIOProc(void *inRefCon,
static const char * getMessage(UINT msg) static const char * getMessage(UINT msg)
{ {
static char unknown[32];
#define MSG_TO_STR(x) case x: return #x #define MSG_TO_STR(x) case x: return #x
switch(msg) { switch(msg) {
MSG_TO_STR(DRVM_INIT); MSG_TO_STR(DRVM_INIT);
@ -306,8 +305,7 @@ static const char * getMessage(UINT msg)
MSG_TO_STR(DRV_QUERYDSOUNDDESC); MSG_TO_STR(DRV_QUERYDSOUNDDESC);
} }
#undef MSG_TO_STR #undef MSG_TO_STR
sprintf(unknown, "UNKNOWN(0x%04x)", msg); return wine_dbg_sprintf("UNKNOWN(0x%04x)", msg);
return unknown;
} }
#define kStopLoopMessage 0 #define kStopLoopMessage 0

View File

@ -92,7 +92,6 @@ static int numMixers = 1;
static const char * getMessage(UINT uMsg) static const char * getMessage(UINT uMsg)
{ {
static char str[64];
#define MSG_TO_STR(x) case x: return #x; #define MSG_TO_STR(x) case x: return #x;
switch (uMsg) { switch (uMsg) {
MSG_TO_STR(DRVM_INIT); MSG_TO_STR(DRVM_INIT);
@ -109,13 +108,11 @@ static const char * getMessage(UINT uMsg)
MSG_TO_STR(MXDM_SETCONTROLDETAILS); MSG_TO_STR(MXDM_SETCONTROLDETAILS);
} }
#undef MSG_TO_STR #undef MSG_TO_STR
sprintf(str, "UNKNOWN(%08x)", uMsg); return wine_dbg_sprintf("UNKNOWN(%08x)", uMsg);
return str;
} }
static const char * getControlType(DWORD dwControlType) static const char * getControlType(DWORD dwControlType)
{ {
static char str[64];
#define TYPE_TO_STR(x) case x: return #x; #define TYPE_TO_STR(x) case x: return #x;
switch (dwControlType) { switch (dwControlType) {
TYPE_TO_STR(MIXERCONTROL_CONTROLTYPE_CUSTOM); TYPE_TO_STR(MIXERCONTROL_CONTROLTYPE_CUSTOM);
@ -151,13 +148,11 @@ static const char * getControlType(DWORD dwControlType)
TYPE_TO_STR(MIXERCONTROL_CONTROLTYPE_MILLITIME); TYPE_TO_STR(MIXERCONTROL_CONTROLTYPE_MILLITIME);
} }
#undef TYPE_TO_STR #undef TYPE_TO_STR
sprintf(str, "UNKNOWN(%08x)", dwControlType); return wine_dbg_sprintf("UNKNOWN(%08x)", dwControlType);
return str;
} }
static const char * getComponentType(DWORD dwComponentType) static const char * getComponentType(DWORD dwComponentType)
{ {
static char str[64];
#define TYPE_TO_STR(x) case x: return #x; #define TYPE_TO_STR(x) case x: return #x;
switch (dwComponentType) { switch (dwComponentType) {
TYPE_TO_STR(MIXERLINE_COMPONENTTYPE_DST_UNDEFINED); TYPE_TO_STR(MIXERLINE_COMPONENTTYPE_DST_UNDEFINED);
@ -182,13 +177,11 @@ static const char * getComponentType(DWORD dwComponentType)
TYPE_TO_STR(MIXERLINE_COMPONENTTYPE_SRC_ANALOG); TYPE_TO_STR(MIXERLINE_COMPONENTTYPE_SRC_ANALOG);
} }
#undef TYPE_TO_STR #undef TYPE_TO_STR
sprintf(str, "UNKNOWN(%08x)", dwComponentType); return wine_dbg_sprintf("UNKNOWN(%08x)", dwComponentType);
return str;
} }
static const char * getTargetType(DWORD dwType) static const char * getTargetType(DWORD dwType)
{ {
static char str[64];
#define TYPE_TO_STR(x) case x: return #x; #define TYPE_TO_STR(x) case x: return #x;
switch (dwType) { switch (dwType) {
TYPE_TO_STR(MIXERLINE_TARGETTYPE_UNDEFINED); TYPE_TO_STR(MIXERLINE_TARGETTYPE_UNDEFINED);
@ -199,8 +192,7 @@ static const char * getTargetType(DWORD dwType)
TYPE_TO_STR(MIXERLINE_TARGETTYPE_AUX); TYPE_TO_STR(MIXERLINE_TARGETTYPE_AUX);
} }
#undef TYPE_TO_STR #undef TYPE_TO_STR
sprintf(str, "UNKNOWN(%08x)", dwType); return wine_dbg_sprintf("UNKNOWN(%08x)", dwType);
return str;
} }
/* FIXME is there a better way ? */ /* FIXME is there a better way ? */