http://bugs.winehq.org/show_bug.cgi?id=14717
--- Comment #31 from Krzysztof Nikiel zzdz2@yahoo.pl 2010-11-27 12:53:14 CST --- (In reply to comment #30)
Unfortunately, the InterlockedIncrement-based synchronozation still looks wrong. Suppose that two threads call the DSOUND_CreateFIR() function simultaneously. Then, obviously, only one copy will fill in the values. The other copy will return immediately, as if the FIR is already filled. Then the thread that called that copy will immediately continue, with the assumption that the FIR is ready, while in fact it isn't yet.
Indeed, it may happen that a thread produces some samples using uninitialized table, some noise. Looks like it needs a mutex or predefined tables to be thread safe.