winmm: Avoid using sizeof() in traces.
This commit is contained in:
parent
15fd7a028f
commit
0beeffa935
|
@ -968,11 +968,10 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DWO
|
||||||
/* FIXME: nothing on wh32->lpNext */
|
/* FIXME: nothing on wh32->lpNext */
|
||||||
/* could link the wh32->lpNext at this level for memory house keeping */
|
/* could link the wh32->lpNext at this level for memory house keeping */
|
||||||
wh32->lpNext = wh16; /* for reuse in unprepare and write */
|
wh32->lpNext = wh16; /* for reuse in unprepare and write */
|
||||||
TRACE("wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
|
||||||
seg_ptr + sizeof(LPWAVEHDR), wh16->lpData,
|
|
||||||
wh32->dwBufferLength, wh32->lpData);
|
|
||||||
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
||||||
*lpParam2 = sizeof(WAVEHDR);
|
*lpParam2 = sizeof(WAVEHDR);
|
||||||
|
TRACE("wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
||||||
|
*lpParam1, wh16->lpData, wh32->dwBufferLength, wh32->lpData);
|
||||||
|
|
||||||
ret = WINMM_MAP_OKMEM;
|
ret = WINMM_MAP_OKMEM;
|
||||||
} else {
|
} else {
|
||||||
|
@ -990,14 +989,14 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DWO
|
||||||
|
|
||||||
assert(*(LPWAVEHDR*)ptr == wh32);
|
assert(*(LPWAVEHDR*)ptr == wh32);
|
||||||
|
|
||||||
TRACE("wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
|
||||||
seg_ptr + sizeof(LPWAVEHDR), wh16->lpData, wh32->dwBufferLength, wh32->lpData);
|
|
||||||
|
|
||||||
if (wMsg == WIDM_ADDBUFFER)
|
if (wMsg == WIDM_ADDBUFFER)
|
||||||
memcpy((LPSTR)wh16 + sizeof(WAVEHDR), wh32->lpData, wh32->dwBufferLength);
|
memcpy((LPSTR)wh16 + sizeof(WAVEHDR), wh32->lpData, wh32->dwBufferLength);
|
||||||
|
|
||||||
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
||||||
*lpParam2 = sizeof(WAVEHDR);
|
*lpParam2 = sizeof(WAVEHDR);
|
||||||
|
TRACE("wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
||||||
|
*lpParam1, wh16->lpData, wh32->dwBufferLength, wh32->lpData);
|
||||||
|
|
||||||
/* dwBufferLength can be reduced between prepare & write */
|
/* dwBufferLength can be reduced between prepare & write */
|
||||||
if (wMsg == WIDM_ADDBUFFER && wh16->dwBufferLength < wh32->dwBufferLength) {
|
if (wMsg == WIDM_ADDBUFFER && wh16->dwBufferLength < wh32->dwBufferLength) {
|
||||||
ERR("Size of buffer has been increased from %d to %d, keeping initial value\n",
|
ERR("Size of buffer has been increased from %d to %d, keeping initial value\n",
|
||||||
|
@ -1528,11 +1527,10 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DW
|
||||||
/* FIXME: nothing on wh32->lpNext */
|
/* FIXME: nothing on wh32->lpNext */
|
||||||
/* could link the wh32->lpNext at this level for memory house keeping */
|
/* could link the wh32->lpNext at this level for memory house keeping */
|
||||||
wh32->lpNext = wh16; /* for reuse in unprepare and write */
|
wh32->lpNext = wh16; /* for reuse in unprepare and write */
|
||||||
TRACE("wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
|
||||||
seg_ptr + sizeof(LPWAVEHDR), wh16->lpData,
|
|
||||||
wh32->dwBufferLength, wh32->lpData);
|
|
||||||
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
||||||
*lpParam2 = sizeof(WAVEHDR);
|
*lpParam2 = sizeof(WAVEHDR);
|
||||||
|
TRACE("wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
||||||
|
*lpParam1, wh16->lpData, wh32->dwBufferLength, wh32->lpData);
|
||||||
|
|
||||||
ret = WINMM_MAP_OKMEM;
|
ret = WINMM_MAP_OKMEM;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1550,15 +1548,14 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DW
|
||||||
|
|
||||||
assert(*(LPWAVEHDR*)ptr == wh32);
|
assert(*(LPWAVEHDR*)ptr == wh32);
|
||||||
|
|
||||||
TRACE("wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
|
||||||
seg_ptr + sizeof(LPWAVEHDR), wh16->lpData,
|
|
||||||
wh32->dwBufferLength, wh32->lpData);
|
|
||||||
|
|
||||||
if (wMsg == WODM_WRITE)
|
if (wMsg == WODM_WRITE)
|
||||||
memcpy((LPSTR)wh16 + sizeof(WAVEHDR), wh32->lpData, wh32->dwBufferLength);
|
memcpy((LPSTR)wh16 + sizeof(WAVEHDR), wh32->lpData, wh32->dwBufferLength);
|
||||||
|
|
||||||
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
|
||||||
*lpParam2 = sizeof(WAVEHDR);
|
*lpParam2 = sizeof(WAVEHDR);
|
||||||
|
TRACE("wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p\n",
|
||||||
|
*lpParam1, wh16->lpData, wh32->dwBufferLength, wh32->lpData);
|
||||||
|
|
||||||
/* dwBufferLength can be reduced between prepare & write */
|
/* dwBufferLength can be reduced between prepare & write */
|
||||||
if (wMsg == WODM_WRITE && wh16->dwBufferLength < wh32->dwBufferLength) {
|
if (wMsg == WODM_WRITE && wh16->dwBufferLength < wh32->dwBufferLength) {
|
||||||
ERR("Size of buffer has been increased from %d to %d, keeping initial value\n",
|
ERR("Size of buffer has been increased from %d to %d, keeping initial value\n",
|
||||||
|
|
Loading…
Reference in New Issue