I don't think this is the right think to do:
- from hard coding the driver name, winealsa should enumerate all
installed alsa drivers, and be prepared to open such a device

Just to clarify - the device name *was* hardcoded to "hw,0", the patch makes it possible to specify it in the configuration file.
which I'm say is a bad idea. the Alsa driver should report all available drivers, and you should not be forced to define the one you want.
To be more correct, the notion of "default device" exists under windows, but has to be handled at the wave mapper level, not at the driver level.

- from the mmap configuration, this should be identified at run time,
not by an obscure configuration option
Well, it is identified at run time by the current code, and the driver tries to use it, but it doesn't work. So I added the option as a way to tell winealsa not to use the mmap interface. Here is the error that I get if mmap is enabled:

trace:wave:wodPlayer_WriteMaxFrags Writing wavehdr 0x4122c260.0[32768]
wine: pcm_plugin.c:491: snd_pcm_plugin_mmap_commit: Assertion `size == 0' failed.

Those ALSA assertions are pretty annoying, no way to inspect the error or to bail out :-(
that's why I say we have to remove those assertions and do proper error handling instead
btw, if ALSA fails with an assert it's either:
- a bug in the ALSA driver
- a bug in the ALSA library
=> those should be fixed (as ALSA isn't 1.0 yet, there's no need to work around it in wine code)

A+





Reply via email to