http://bugs.winehq.org/show_bug.cgi?id=14717
--- Comment #4 from Alexander E. Patrakov patrakov@gmail.com 2009-02-03 00:33:34 --- The bug still exists and is easily triggered by playing music by Caravelli (album: grand prix) in foobar2000. Anyway, you can check for this bug yourself using the procedure below and any mp3 file containing music.
1. Install Jack (and, for convenience, qjackctl) and recompile wine so that it has a Jack output driver. Install PortAudio with the Jack backend, install Audacity.
2. Start Jack (preferrably, using qjackctl) with 192 kHz sampling rate and two channels (assuming that your hardware supports it). The intention is to make long runs of the same sample easily visible in the recorded waves. Verify that you can record from Jack in Audacity.
3. Using winecfg, select Jack as the output driver, set "Emulation" as the hw acceleration level, and tick the "Emulation" checkbox (not sure if this step is relevant)
4. Using regedit, go to the HKEY_CURRENT_USER\Software\Wine\DirectSound key, and change the DefaultSampleRate value to 192000.
5. Install foobar2000 in wine and run it. Start playing a long sound file.
6. Start audacity, select 192000 Hz as the project sampling rate, select wine_jack_out_0 as the recording source, start recording. jackrec may work, too, but I didn't test it.
7. Record several seconds of wine output through jack in audacity. Export as a 32-bit headerless raw file.
8. Look at the raw file with a hex editor, or use the following command:
od -A d -v -t d4 --width=8 wine.raw | less
Here is part of the output from my file:
0000000 -572671040 -563692352 0000008 -572671040 -563692352 0000016 -572671040 -563692352 0000024 -357640864 -732190528 0000032 -357640864 -732190528 0000040 -357640864 -732190528 0000048 -357640864 -732190528 0000056 -326575840 -840262720 0000064 -326575840 -840262720 0000072 -326575840 -840262720 0000080 -326575840 -840262720 0000088 -336275488 -845636800 0000096 -336275488 -845636800 0000104 -336275488 -845636800 0000112 -336275488 -845636800 0000120 -336275488 -845636800 0000128 -209590528 -826761856 0000136 -209590528 -826761856 0000144 -209590528 -826761856 0000152 -209590528 -826761856 0000160 -81791424 -820666816
You can clearly see the long runs of duplicated sample values, which means that wine is using zero-order-hold resampling.
Also, in audacity, you can look at the spectrum of what you recorded. Ideally, below half of the sampling rate of the sound file, it should exactly match what's in the sound file, while above that, it should be zero. Actually, there are distortions of -30 dB both above and below that frequency on real music files.