[RFC] winecfg audio driver test

Eric Pouech eric.pouech at wanadoo.fr
Sat Nov 12 12:26:22 CST 2005

Robert Reif wrote:
> Eric Pouech wrote:
>> Robert Reif wrote:
>>> This is a proof of concept patch that adds a simple audio test to 
>>> winecfg.
>>> All it does is use PlaySound to play a wave file.  I am using
>>> LoadLibrary("winmm.dll") and FreeLibrary to change drivers.
>>> You must press the apply button for the driver change to take effect.
>>> There is no error recovery for a missing winmm.dll.  The wave
>>> file name is in the rc file so a different file can be played for 
>>> each language.
>>> This is probably overkill.  I'm not sure where to put the wave file
>>> so the program will only work when the wave file is in the current 
>>> directory.
>>> The wave file can be found here:  
>>> http://home.earthlink.net/~reif/winecfg.en.wav
>>> or you can rename any old wave file to: winecfg.en.wav.
>>> Comments please?
>> 1/ why don't you store the wave in the resource file ? (PlaySound has 
>> the ability to play a sound from the resource file)
> I considered that but the trick is to come up with a universal test sound
> that anyone would recognize as either playing properly or playing with
> some type of distortion (speed, noise, breakup, ...).
and ? I was refering to where storing the sound, or do you intend to let 
the user chooses the sound he/she wants to play ??

>> 2/ in order to change drivers, one could also look at the installed 
>> drivers from winmm and setup the wave mapper to point to the desired 
>> one for playback. that would prevent from loading/unloading winmm for 
>> each driver change 
> That would require all available drivers to be loaded.  By driver, I'm 
> talking about
> ALSA, OSS, Jack, ..., not sound card one or two.  Enumerating the
> available sound cards and testing them individually could also be added.
> I could unload the wine driver directly (winealsa.drv, wineoss.drv,...) and
> load the new one but I didn't know how robust that would be so I
> just let winmm.dll do all the work.  I'll try unloading the drivers 
> directly and see
> what happens.
I had more in mind something around:
- get list of drivers likely to be loaded (as winecfg does)
- make the registry key for those
- load winmm with those settings
- then use the mapper to move from driver to driver (yes, you'll have to 
deal with multiple audio channels on the same card)

Eric Pouech

More information about the wine-devel mailing list