http://bugs.winehq.org/show_bug.cgi?id=14717
--- Comment #109 from Alexander E. Patrakov patrakov@gmail.com 2011-01-02 00:20:03 CST --- (In reply to comment #88)
have you noticed that wine developer disable the resampling of the "default" device in dsoutput.c
#if SND_LIB_VERSION >= 0x010009 snd_pcm_hw_params_set_rate_resample(pcm, hw_params, 0); #endif
Thanks for pointing this out. This line indeed has an interesting effect. If I configure the default sample rate in wine to be 44100 Hz in the default "plug:dmix" setup without changing the default dmix rate via defaults.pcm.dmix.rate, here is what happens when nothing else is playing:
1) this line disables resampling in the plug, effectively leaving us with dmix only
2) wine tries to open dmix at "something near 44100 Hz"
3) alsa is smart enough to ignore the explicit 48 kHz rate configured for dmix in favour of wine request (confirmed by /proc/asound/Intel/pcm0p/sub0/hw_params)
End result: dmix running at 44100 Hz (even though the alsa configuration tells otherwise) and playing what wine feeds to it.