https://bugs.winehq.org/show_bug.cgi?id=30639
--- Comment #44 from Erich E. Hoover erich.e.hoover@wine-staging.com --- (In reply to winetest from comment #43)
I could be wrong, but in the staging patch...
float cur_freqAcc = (freqAcc_start + i * dsb->freqAdjustNum) / (float)dsb->freqAdjustDen;
should there be also (float)dsb->freqAdjustNum) missing (float)?
It doesn't matter, the division operation will be performed in floats since the denominator is a float. No math in the numerator requires floats.
The staged patch for this is not ideal, what it does is reduce the computation required inside of the mixing lock. I have been spending some energy trying to understand the pieces that go together in the mixing code (honestly, it needs to be reorganized) and I believe that it is possible to reduce the amount of code that occurs within the lock. If I am successful in this endeavor then the re-sampling operation can occur outside the lock (only the mixing itself will occur within the lock) and that will allow multiple streams to be re-sampled simultaneously, instead of requiring that only one stream be re-sampled at a time.