mciavi: Prevent deadlock when closing while playing or when paused.

Maarten Lankhorst m.b.lankhorst at gmail.com
Fri Mar 12 11:48:24 CST 2010


Hi Joerg,

On 12-03-10 16:02, Joerg-Cyril.Hoehle at t-systems.com wrote:
> Hi,
>
> Maarten Lankhorst wrote:
>    
>> Using a winmm timer there would remove the
>> need for that thread altogether
>>      
> Please explain the idea.
>
>    
>> as part of my sound rewrite I will write a new winmm driver
>>      
> My understanding is that there will be a new winmm, but all MCI* drivers
> operate on top of that and are not changed.  Thus the question still
> remains what "Quality of Implementation" to implement there w.r.t. multiple
> threads sending MCI commands to the same device:
>    
There won't be a new winmm, there will just be a new winmm driver, and 
the existing winmm drivers will have their wave in/out capability 
removed. :)
>   - ignore the issue;
>   - make each device/unit robust against concurrent use;
>   - make only MCI_Close robust;
>   - ...?
>
> This can perhaps be considered independently on the same questions w.r.t.
> winmm:midi/waveXyz functions.  The winmm MUST deal with concurrency IMHO
> because of the callback practice.  There's nothing like this in the MCI.
>    
The solution is working with concurrency, not much else you could do. 
Winmm should be thread safe, however each driver has to be sure it's 
handled correctly separately, since winmm is not aware of any threads a 
driver may have. :)

Cheers,
Maarten



More information about the wine-devel mailing list