• Ken Thomases's avatar
    winecoreaudio: Fix race to open. · 00e99963
    Ken Thomases authored
    Fixes a race condition (noted in a comment for wodOpen) when multiple
    threads try to open the same wave-out device simultaneously.
    Addressed by creating the device mutexes when the driver is
    initialized, instead of as each device is opened.  Then use the mutex
    to protect the open operation against races.  At the same time, made
    the mutexes recursive to avoid self-deadlocks the driver was
    encountering when reentered from the callback.
    00e99963
audio.c 47.7 KB