AW: winealsa.drv patch to enum all software devices from .asoundrc

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Mon Feb 13 07:17:13 CST 2012


Hi,

Нискородов Серёжа wrote:
>Do you can play wav mono 11025Hz directly to your dmix51 device?
>Without "plug:" wrapper? With my soundcard I can't.
>So I can enumerate dmix*: devices to, I even can enumerate all
>devices, but I see almost no sence in this.

My Ubuntu dmix can't either.
All it accepts is 48000 two channel 32bit(!) integer PCM.
You can check with speaker-test -Ddmix -c2 ...


Chris Robinson wrote:
>Plain mmdevapi can't do rate conversions
You forgot AUDCLNT_STREAMFLAGS_RATEADJUST since w7.

>As I mentioned, native mmdevapi doesn't do samplerate conversion or channel 
>remixing. For shared mode, the device only opens with a pre-defined, user-
>selected rate and channel config. The only thing the default native mmdevapi 
>will do is accept different sample depths/type (prefering float32).

Right. Have a look at dlls/mmdevapi/tests/render output:
http://test.winehq.org/data/tests/mmdevapi:render.html
A very typical result is:
render.c:409: IsSupported(exclus., 44100x16x2)
render.c:409: IsSupported(exclus., 48000x16x2)
render.c:409: IsSupported(shared , 44100x 8x2)
render.c:409: IsSupported(shared , 44100x16x2)
The HW supports solely 2 channel 16bit stereo but both 44100 and 48000fps.
In the system's audio preferences dialog, the user has selected 44100.
That's why GetMixFormat returns that rate.  In addition, the
shared mode mixer accepts 8bit -- but not mono!
IOW, it converts 8 and 16bit samples to its internal floating point format.
48000 gets refused based on the user's selection.

>It's up to the app or whatever component is using mmdevapi to convert
>to the rate/channels given by GetMixFormat.

This is misleading in the context of Wine.  As I've laid down in
http://wiki.winehq.org/Sound?highlight=(Limitations)
Wine depends on a non-conforming mmdevapi that accepts all possible
formats such as 7192x8x1 for its winmm and DSound to work.
That's also why it uses plughw:0 instead of hw:0 when not using "default".

Since Vista, dlls/winmm/tests/wave reports formats=fffff i.e. all
formats supported.  So there is something between native's winmm and
mmdevapi that converts all of those.  In Wine, there's nothing.
Wine expects the ALSA/OSS/CoreAudio back-end to do that.
(that is why I've argued that DSound's resampler should be part
 of mmdevapi instead such that all Wine components could use it).

Regards,
	Jörg Höhle


More information about the wine-devel mailing list