http://bugs.winehq.org/show_bug.cgi?id=14717
--- Comment #119 from Raymond superquad.vortex2@gmail.com 2011-01-02 19:40:35 CST --- (In reply to comment #109)
(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:
- this line disables resampling in the plug, effectively leaving us with dmix
only
it still provide 8bits to 16bits , mono to stereo conversion as your hda does not support 8bits and mono.
wine tries to open dmix at "something near 44100 Hz"
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.
you can specify the winecfg's default dsound rate as dmix's sample rate by open pcm device plug:'dmix:0,RATE=22050' if your hardware support 22050Hz without changing anything
This mean wine have to specify the default rate (specified in winefg) in snd_pcm_open() in dsoutput.c
I think it is not correct for wine to allow dsound to use 'dmix' or 'pulse' as the primary buffer to mix those ds3d games's 16 voices
it is not a good solution for ds3d to use "plughw" device since the mono 3D spatialisation need software left/right panning of 16 voices performed inside dsound when your sound card does not provide hardware volume panning for 16 voices
Try using "hw:0,0" instead of "dmix" when running RMAA or rightmark 3dsound
http://appdb.winehq.org/objectManager.php?sClass=version&iId=8993
RightMark 3DSound: Positioning Accuracy test RightMark 3DSound: CPU Utilization test