Do not free the header while unmapping the xxxx_UNPREPARE messages
eric.pouech at wanadoo.fr
Wed Dec 25 10:19:03 CST 2002
Dmitry Timoshkov wrote:
> this patch is aimed to fix crashes in the old 16-bit game, which
> calls waveOutUnprepareHeader16 for busy headers. MMDRV_Message
> in that case returns WAVERR_STILLPLAYING, but it's not stopping
> MMDRV_WaveOut_UnMap16To32A() from freeing the header. Slightly
> later game calls waveOutReset16() which crashes. In that case
> the duty of freeing the header should be moved to a higher level.
> I have generalized this approach to all similar cases.
I'd rather see the fix being made completely in message16.c by adding
the return value to the unmapping functions
IMO, it better encapsulates all the 32<=>16 message mappings, and it's
bad to spread this across several compilation unit
More information about the wine-devel