[Bug 14717] resampled sound is horrible

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Nov 24 00:26:59 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=14717

--- Comment #15 from Alexander E. Patrakov <patrakov at gmail.com> 2010-11-24 00:26:58 CST ---
I am currently at work, so cannot run-test the patch. Will do so at home.
However, I can review the code.

The math is very understandable:

  * Precalculate a windowed sinc filter that is sufficient for a 50x change in
the sample rate.

  * Calculate the step of the FIR, differently in the cases of upsampling and
downsampling. Round it to an integer, this only affects the position of the
transition in the frequency response.

  * Interpolate the FIR linearly between the precalculated points, calculate
the convolution in the simplest possible way (i.e., without any polyphase
tricks that can speed up the process).

Questions:

1) Why is the sinc Kaiser-windowed? There are simpler windows that don't
require calculation of modified Bessel functions.

2) Why are the start of the stopband and the transition width chosen this way?
As far as I understand, this will lead to attenuation near the Nyquist
frequency of worse than -6 dB (not checked, but guessed by the fact that the
transition width is more than the distance between the start of the stopband
and the Nyquist frequency).

3) Did you test your patch for security bugs like buffer overflows for certain
stupid requests like "resample this from a 100 Hz buffer to a 192 kHz output
buffer"?

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list