Wine Developer's Guide | ||
---|---|---|
Prev | Chapter 14. Wine and Multimedia |
Unfortunately, multimedia configuration evolved over time:
In the early days on Windows 3.x, configuration was stored in system.in file, under various sections ([drivers] for low level drivers, [mci] (resp. [mci32]) for 16 bit (resp. 32 bit) MCI drivers...).
With the apparition of the registry, in Windows 95, configuration as been duplicated there, under the key
HKLM\System\CurrentControlSet\Control\MediaResources
Windows NT also adopted the registry, but decided to store the configuration information under another key than Windows 9x did.
HKLM\Software\Microsoft\Windows NT\CurrentVersionAnd with a different layout of keys and values beneath this key.
Currently, Wine tries to load first a driver (low-level or MCI) from the NT registry settings. If it fails, it will try the system.ini configuration.
An out-of-the-box configuration is provided in wine.inf, and shall be stored in registry and system.ini at Wine installation time. It will setup correctly the MCI drivers' configuration (as well as the wave and MIDI mappers). As the low-level drivers depend on hardware, their setup will be handled by winecfg.
Table 14-5. Wine multimedia configuration scheme
Driver | Read from NT registry | Read from system.ini | Setup by wine.inf | Setup by winecfg |
---|---|---|---|---|
MCI drivers | Yes (1) | Yes (2) | Yes | No |
Wave and MIDI mappers | Yes | No | Yes | No |
Hardware-bound low level drivers | Yes | No | No | Yes |
ACM and VIDC drivers (audio & video codecs) | No | Yes | Yes | No |
This will allow most settings to be correctly loaded and handled. However, it won't if an app tries to search directly the registry for the actual configuration, as the three potential configuration places may not be in sync.
It still lacks a correct installation scheme (as any multimedia device under Windows), so that all the correct keys are created in the registry. This requires an advanced model since, for example, the number of wave out devices can only be known on the destination system (depends on the sound card driven by the OSS interface).
The following sections describe which type of information (depending on the location) Wine's multimedia DLLs understand.
Under the
HKLM\Software\Microsoft\Windows NT\CurrentVersionkey, are stored the names of the DLLs to be loaded for each MCI driver name:
"cdaudio"="mcicda.drv" "sequencer"="mciseq.drv" "waveaudio"="mciwave.drv" "avivideo"="mciavi.drv" "videodisc"="mcipionr.drv" "vcr"="mcivisca.drv" "MPEGVideo"="mciqtz.drv"
Wine will read the MCI drivers from the [mci] or [mci32] section. Wine won't make any difference between the two.
Here's a sample configuration:
[mci] cdaudio=mcicda.drv sequencer=mciseq.drv waveaudio=mciwave.drv avivideo=mciavi.drv videodisc=mcipionr.drv vcr=mcivisca.drv MPEGVideo=mciqtz.drv
ACM drivers' configuration is read (only so far) from the system.ini (and setup at Wine installation from the wine.inf file).
[drivers32] MSACM.imaadpcm=imaadp32.acm MSACM.msadpcm=msadp32.acm MSACM.msg711=msg711.acm MSACM.winemp3=winemp3.acm
Video (aka vidc) drivers' configuration is read (only so far) from the system.ini (and setup at Wine installation from the wine.inf file).
[drivers32] VIDC.MRLE=msrle32.dll VIDC.MSVC=msvidc32.dll VIDC.CVID=iccvid.dll
See also the configuration part of the User's Guide for other information on low level drivers.
The Midi mapper configuration is the same as on Windows 9x. Under the key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Multimedia\MIDIMapif the UseScheme value is not set, or is set to a null value, the MIDI mapper will always use the driver identified by the CurrentInstrument value. Note: Wine (for simplicity while installing) allows to define CurrentInstrument as #n (where n is a number), whereas Windows only allows the real device name here. If UseScheme is set to a non null value, CurrentScheme defines the name of the scheme to map the different channels. All the schemes are available with keys like
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Midi\Schemes\%name_of_scheme%For every scheme, under this key, will be a sub-key (which name is usually a two digit index, starting at 00). Its default value is the name of the output driver, and the value Channels lists all channels (of the 16 standard MIDI ones) which have to be copied to this driver.
To provide enhanced configuration and mapping capabilities, each driver can define under the key
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Midi\Ports\%driver_name%a link to and .IDF file which allows to remap channels internally (for example 9 -> 16), to change instruments identification, event controllers values. See the source file dlls/winmm/midimap/midimap.c for the details (this isn't implemented yet).