winmm: More compatible waveIn/Out[Un]Prepare WHDR_* flag handling.
Joerg-Cyril.Hoehle at t-systems.com
Joerg-Cyril.Hoehle at t-systems.com
Mon Feb 11 06:28:09 CST 2013
Hi,
This completes my winmm Prepare Header changes on the wave side.
XyzPrepare:
+ header->dwFlags &= ~(WHDR_DONE|WHDR_INQUEUE); /* flags cleared since w2k */
I choose to implement the behavior since w2k. Hopefully this will not break some w9x app.
WINMM_UnprepareHeader:
- header->dwFlags |= WHDR_DONE;
Never ever observed. Neither w95 nor xp or w7.
Perhaps MS would have been wise to do so, as simply looking at a header you cannot
tell whether it's been processed or not (returned with error code).
I choose to implement compatible behaviour.
- if(!(lpWaveInHdr->dwFlags & WHDR_PREPARED))
- return MMSYSERR_NOERROR;
if(lpWaveInHdr->dwFlags & WHDR_INQUEUE)
return WAVERR_STILLPLAYING;
+ if(!(lpWaveInHdr->dwFlags & WHDR_PREPARED))
+ return MMSYSERR_NOERROR;
Note the subtle difference in behaviour between wave and midi headers...
>IMHO calling named winmm:xyz functions should be equivalent to dispatching MM* messages
I forgot to add that I'm still surprised that Andrew Eikum could reimplement
waveIn/OutMessage *without* using MMDRV_Message by simply returning MMSYSERR_NOTSUPPORTED.
Either all apps use the named winmm:waveIn/OutXyz functions instead of calling waveOutMessage()
or nobody bothered to complain that some apps (perhaps w3.1 ones?) lack sound.
That area obviously needs some testing...
Regards,
Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-winmm-More-compatible-waveIn-Out-Un-Prepare-WHDR_.patch
Type: application/octet-stream
Size: 4711 bytes
Desc: 0002-winmm-More-compatible-waveIn-Out-Un-Prepare-WHDR_.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130211/965a4495/attachment.obj>
More information about the wine-patches
mailing list