winmm: More compatible waveIn/Out[Un]Prepare WHDR_* flag handling.

Andrew Eikum aeikum at codeweavers.com
Wed Feb 13 09:44:20 CST 2013


These two patches look fine to me. Thanks!

On Mon, Feb 11, 2013 at 01:28:09PM +0100, Joerg-Cyril.Hoehle at t-systems.com wrote:
> 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





More information about the wine-devel mailing list