Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1 | <chapter id="multimedia"> |
| 2 | <title>Wine and Multimedia</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 3 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 4 | <para> |
| 5 | This file contains information about the implementation of the |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 6 | multimedia layer of WINE. |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 7 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 8 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 9 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 10 | The implementation can be found in the dlls/winmm/ directory (and in |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 11 | many of its subdirectories), but also in dlls/msacm/ (for the |
| 12 | audio compression/decompression manager) and dlls/msvideo/ (for the |
| 13 | video compression/decompression manager). |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 14 | </para> |
| 15 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 16 | <para> |
| 17 | Written by &name-eric-pouech; <email>&email-eric-pouech;</email> |
| 18 | (Last updated: 02/16/2001) |
| 19 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 20 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 21 | <sect1 id="mm-overview"> |
| 22 | <title>Overview</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 23 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 24 | <para> |
| 25 | The multimedia stuff is split into 3 layers. The low level (device |
| 26 | drivers), mid level (MCI commands) and high level abstraction layers. |
| 27 | The low level layer has also some helper DLLs (like the MSACM/MSACM32 |
| 28 | and MSVIDEO/MSVFW32 pairs). |
| 29 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 30 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 31 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 32 | The low level layer may depend on current hardware and OS services |
| 33 | (like OSS on Unix). Mid level (MCI) and high level layers must be |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 34 | written independently from the hardware and OS services. |
| 35 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 36 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 37 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 38 | There are two specific low level drivers (one for wave input/output, |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 39 | another one for MIDI output only), whose role is: |
| 40 | <itemizedlist> |
| 41 | <listitem> |
| 42 | <para>help choosing one low level driver between many</para> |
| 43 | </listitem> |
| 44 | <listitem> |
| 45 | <para> |
| 46 | add the possibility to convert streams (ie ADPCM => PCM) |
| 47 | </para> |
| 48 | </listitem> |
| 49 | <listitem> |
| 50 | <para> |
| 51 | add the possibility to filter a stream (adding echo, equalizer... |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 52 | to a wave stream), or modify the instruments that have to be |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 53 | played (MIDI). |
| 54 | </para> |
| 55 | </listitem> |
| 56 | </itemizedlist> |
| 57 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 58 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 59 | <para> |
| 60 | All of those components are defined as DLLs (one by one). |
| 61 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 62 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 63 | </sect1> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 64 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 65 | <sect1 id="mm-low"> |
| 66 | <title>Low level layers</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 67 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 68 | <para> |
| 69 | Please note that native low level drivers are not currently supported |
| 70 | in WINE, because they either access hardware components or require |
| 71 | VxDs to be loaded; WINE does not correctly supports those two so far. |
| 72 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 73 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 74 | <para> |
| 75 | The following low level layers are implemented (as built-in DLLs): |
| 76 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 77 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 78 | <sect2> |
| 79 | <title>(Wave form) Audio</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 80 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 81 | <para> |
| 82 | MMSYSTEM and WINMM call the real low level audio driver using the |
| 83 | wodMessage/widMessage which handles the different requests. |
| 84 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 85 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 86 | <sect3> |
| 87 | <title>OSS implementation</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 88 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 89 | <para> |
| 90 | The low level audio driver is currently only implemented for the |
| 91 | OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 92 | <ulink url="http://www.4front-tech.com/">4Front Technologies</ulink>. |
| 93 | The presence of this driver is checked by configure (depends on the |
| 94 | <sys/soundcard.h> file). Source code resides in |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 95 | dlls/winmm/wineoss/audio.c. |
| 96 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 97 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 98 | <para> |
| 99 | The implementation contains all features commonly used, but has |
| 100 | several problems (see TODO list). |
| 101 | </para> |
| 102 | |
| 103 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 104 | Note that some Wine specific flag has been added to the wodOpen function, |
| 105 | so that the dsound DLL can share the /dev/dsp access. Currently, this |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 106 | only provides mutual exclusion for both DLLs. Future extension could add |
| 107 | a virtual mixer between the two output streams. |
| 108 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 109 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 110 | <para>TODO: |
| 111 | <itemizedlist> |
| 112 | <listitem> |
| 113 | <para> |
| 114 | verify all functions for correctness |
| 115 | </para> |
| 116 | </listitem> |
| 117 | <listitem> |
| 118 | <para> |
| 119 | Add virtual mixer between wave-out and dsound interfaces. |
| 120 | </para> |
| 121 | </listitem> |
| 122 | </itemizedlist> |
| 123 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 124 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 125 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 126 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 127 | <sect3> |
| 128 | <title>Other sub systems</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 129 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 130 | <para> |
| 131 | No other is available. Could think of Sun Audio, remote audio systems |
| 132 | (using X extensions, ...), ALSA, EsounD, ArTs... |
| 133 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 134 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 135 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 136 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 137 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 138 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 139 | <sect2> |
| 140 | <title>MIDI</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 141 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 142 | <para> |
| 143 | MMSYSTEM and WINMM call the low level driver functions using the |
| 144 | midMessage and the modMessage functions. |
| 145 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 146 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 147 | <sect3> |
| 148 | <title>OSS driver</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 149 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 150 | <para> |
| 151 | The low level audio driver is currently only implemented for the |
| 152 | OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by |
| 153 | <ulink url="http://www.4front-tech.com/">4Front Technologies</ulink>. |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 154 | The presence of this driver is checked by configure (depends on the |
| 155 | <sys/soundcard.h> file, and also some specific defines because |
| 156 | MIDI is not supported on all OSes by OSS). Source code resides in |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 157 | dlls/winmm/wineoss/midi.c |
| 158 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 159 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 160 | <para> |
| 161 | Both Midi in and Midi out are provided. The type of MIDI devices |
| 162 | supported is external MIDI port (requires an MIDI capable device - |
| 163 | keyboard...) and OPL/2 synthesis (the OPL/2 patches for all |
| 164 | instruments are in midiPatch.c). |
| 165 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 166 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 167 | <para>TODO: |
| 168 | <itemizedlist> |
| 169 | <listitem> |
| 170 | <para> |
| 171 | use better instrument definition for OPL/2 (midiPatch.c) or use |
| 172 | existing instrument definition (from playmidi or kmid) with a |
| 173 | .winerc option |
| 174 | </para> |
| 175 | </listitem> |
| 176 | <listitem> |
| 177 | <para> |
| 178 | have a look at OPL/3 ? |
| 179 | </para> |
| 180 | </listitem> |
| 181 | <listitem> |
| 182 | <para> |
| 183 | implement asynchronous playback of MidiHdr |
| 184 | </para> |
| 185 | </listitem> |
| 186 | <listitem> |
| 187 | <para> |
| 188 | implement STREAM'ed MidiHdr (question: how shall we share the code |
| 189 | between the midiStream functions in MMSYSTEM/WINMM and the code |
| 190 | for the low level driver) |
| 191 | </para> |
| 192 | </listitem> |
| 193 | <listitem> |
| 194 | <para> |
| 195 | use a more accurate read mechanism than the one of snooping on |
| 196 | timers (like select on fd) |
| 197 | </para> |
| 198 | </listitem> |
| 199 | </itemizedlist> |
| 200 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 201 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 202 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 203 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 204 | <sect3> |
| 205 | <title>Other sub systems</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 206 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 207 | <para> |
| 208 | Could support other MIDI implementation for other sub systems (any |
| 209 | idea here ?) |
| 210 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 211 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 212 | <para> |
| 213 | Could also implement a software synthesizer, either inside Wine or |
| 214 | using using MIDI loop back devices in an external program (like |
| 215 | timidity). The only trouble is that timidity is GPL'ed... |
| 216 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 217 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 218 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 219 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 220 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 221 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 222 | <sect2> |
| 223 | <title>Mixer</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 224 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 225 | <para> |
| 226 | MMSYSTEM and WINMM call the low level driver functions using the |
| 227 | mixMessage function. |
| 228 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 229 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 230 | <sect3> |
| 231 | <title>OSS implementation</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 232 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 233 | <para> |
| 234 | The current implementation uses the OpenSoundSystem mixer, and resides |
| 235 | in dlls/winmm/wineoss/mixer.c |
| 236 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 237 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 238 | <para>TODO: |
| 239 | <itemizedlist> |
| 240 | <listitem> |
| 241 | <para> |
| 242 | implement notification mechanism when state of mixer's controls |
| 243 | change |
| 244 | </para> |
| 245 | </listitem> |
| 246 | </itemizedlist> |
| 247 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 248 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 249 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 250 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 251 | <sect3> |
| 252 | <title>Other sub systems</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 253 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 254 | <para>TODO: |
| 255 | <itemizedlist> |
| 256 | <listitem> |
| 257 | <para> |
| 258 | implement mixing low level drivers for other mixers (ALSA...) |
| 259 | </para> |
| 260 | </listitem> |
| 261 | </itemizedlist> |
| 262 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 263 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 264 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 265 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 266 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 267 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 268 | <sect2> |
| 269 | <title>Aux</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 270 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 271 | <para> |
| 272 | The AUX low level driver is the predecessor of the mixer driver |
| 273 | (introduced in Win 95). |
| 274 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 275 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 276 | <sect3> |
| 277 | <title>OSS driver</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 278 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 279 | <para> |
| 280 | The implementation uses the OSS mixer API, and is incomplete. |
| 281 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 282 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 283 | <para>TODO: |
| 284 | <itemizedlist> |
| 285 | <listitem> |
| 286 | <para> |
| 287 | verify the implementation |
| 288 | </para> |
| 289 | </listitem> |
| 290 | <listitem> |
| 291 | <para> |
| 292 | check with what is done in mixer |
| 293 | </para> |
| 294 | </listitem> |
| 295 | <listitem> |
| 296 | <para> |
| 297 | open question: shall we implement it on top of the low level mixer |
| 298 | functions ? |
| 299 | </para> |
| 300 | </listitem> |
| 301 | </itemizedlist> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 302 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 303 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 304 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 305 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 306 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 307 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 308 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 309 | <sect2> |
| 310 | <title>Wine OSS</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 311 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 312 | <para> |
| 313 | All the OSS dependent functions are stored into the WineOSS DLL. It still |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 314 | lack a correct installation scheme (as any multimedia device under Windows), |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 315 | so that all the correct keys are created in the registry. This requires |
| 316 | an advanced model since, for example, the number of wave out devices can |
| 317 | only be known on the destination system (depends on the sound card driven |
| 318 | by the OSS interface). A solution would be to install all the multimedia |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 319 | drivers through the SETUPX DLL; this is not doable yet (the multimedia |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 320 | extension to SETUPX isn't written yet). |
| 321 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 322 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 323 | </sect2> |
| 324 | |
| 325 | <sect2> |
| 326 | <title>Joystick</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 327 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 328 | <para> |
| 329 | The API consists of the joy* functions found in dlls/winmm/joystick/joystick.c. |
| 330 | The implementation currently uses the Linux joystick device driver |
| 331 | API. It is lacking support for enhanced joysticks and has not been |
| 332 | extensively tested. |
| 333 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 334 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 335 | <para>TODO: |
| 336 | <itemizedlist> |
| 337 | <listitem> |
| 338 | <para> |
| 339 | better support of enhanced joysticks (Linux 2.2 interface is available) |
| 340 | </para> |
| 341 | </listitem> |
| 342 | <listitem> |
| 343 | <para> |
| 344 | support more joystick drivers (like the XInput extension) |
| 345 | </para> |
| 346 | </listitem> |
| 347 | <listitem> |
| 348 | <para> |
| 349 | should load joystick DLL as any other driver (instead of hardcoding) |
| 350 | the driver's name, and load it as any low lever driver. |
| 351 | </para> |
| 352 | </listitem> |
| 353 | </itemizedlist> |
| 354 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 355 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 356 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 357 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 358 | <sect2> |
| 359 | <title>Wave mapper (msacm.drv)</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 360 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 361 | <para> |
| 362 | The Wave mapper device allows to load on-demand codecs in order to |
| 363 | perform software conversion for the types the actual low level driver |
| 364 | (hardware). Those codecs are provided through the standard ACM |
| 365 | drivers. |
| 366 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 367 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 368 | <sect3> |
| 369 | <title>Built-in</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 370 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 371 | <para> |
| 372 | A first working implementation for wave out as been provided (wave in |
| 373 | exists, but doesn't allow conversion). |
| 374 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 375 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 376 | <para> |
| 377 | Wave mapper driver implementation can be found in dlls/winmm/wavemap/ |
| 378 | directory. This driver heavily relies on MSACM and MSACM32 DLLs which |
| 379 | can be found in dlls/msacm and dlls/msacm32. Those DLLs load ACM |
| 380 | drivers which provide the conversion to PCM format (which is normally |
| 381 | supported by low level drivers). ADPCM, MP3... fit into the category |
| 382 | of non PCM formats. |
| 383 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 384 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 385 | <para> |
| 386 | There is currently no built-in ACM driver in Wine, so you must use |
| 387 | native ones if you're looking for non PCM playback. |
| 388 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 389 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 390 | <para>TODO: |
| 391 | <itemizedlist> |
| 392 | <listitem> |
| 393 | <para> |
| 394 | check for correctness and robustness |
| 395 | </para> |
| 396 | </listitem> |
| 397 | </itemizedlist> |
| 398 | </para> |
| 399 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 400 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 401 | <sect3> |
| 402 | <title>Native</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 403 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 404 | <para> |
| 405 | Seems to work quite ok (using of course native MSACM/MSACM32 DLLs) |
| 406 | Some other testings report some issues while reading back the registry |
| 407 | settings. |
| 408 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 409 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 410 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 411 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 412 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 413 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 414 | <sect2> |
| 415 | <title>MIDI mapper</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 416 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 417 | <para> |
| 418 | Midi mapper allows to map each one of 16 MIDI channels to a specific |
| 419 | instrument on an installed sound card. This allows for example to |
| 420 | support different MIDI instrument definition (XM, GM...). It also |
| 421 | permits to output on a per channel basis to different MIDI renderers. |
| 422 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 423 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 424 | <sect3> |
| 425 | <title>Built-in</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 426 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 427 | <para> |
| 428 | A built-in MIDI mapper can be found in dlls/winmm/midimap/. It partly |
| 429 | provides the same functionnality as the Windows' one. It allows to pick up |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 430 | destination channels (you can map a given channel to a specific playback |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 431 | device channel (see the configuration bits for more details). |
| 432 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 433 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 434 | <para>TODO: |
| 435 | <itemizedlist> |
| 436 | <listitem> |
| 437 | <para> |
| 438 | implement the Midi mapper features (instrument on the fly modification) |
| 439 | if it has to be done as under Windows, it required parsing the midi |
| 440 | configuration files (didn't find yet the specs) |
| 441 | </para> |
| 442 | </listitem> |
| 443 | </itemizedlist> |
| 444 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 445 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 446 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 447 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 448 | <sect3> |
| 449 | <title>Native</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 450 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 451 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 452 | The native midimapper from Win 98 works, but it requires a bunch of |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 453 | keys in the registry which are not part of the Wine source yet. |
| 454 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 455 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 456 | <para>TODO: |
| 457 | <itemizedlist> |
| 458 | <listitem> |
| 459 | <para> |
| 460 | add native midimapper keys to the registry to let it run. This |
| 461 | will require proper multimedia driver installation routines. |
| 462 | </para> |
| 463 | </listitem> |
| 464 | </itemizedlist> |
| 465 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 466 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 467 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 468 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 469 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 470 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 471 | </sect1> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 472 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 473 | <sect1 id="mm-mci"> |
| 474 | <title>Mid level drivers (MCI)</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 475 | |
| 476 | <para> |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 477 | The mid level drivers are represented by some common API functions, |
| 478 | mostly mciSendCommand and mciSendString. See status in chapter 3 for |
| 479 | more information. WINE implements several MCI mid level drivers |
| 480 | (status is given for both built-in and native implementation): |
| 481 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 482 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 483 | <para>TODO: (apply to all built-in MCI drivers) |
| 484 | <itemizedlist> |
| 485 | <listitem> |
| 486 | <para> |
| 487 | use MMSYSTEM multitasking caps instead of the home grown |
| 488 | </para> |
| 489 | </listitem> |
| 490 | </itemizedlist> |
| 491 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 492 | |
| 493 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 494 | <sect2> |
| 495 | <title>CDAUDIO</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 496 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 497 | <sect3> |
| 498 | <title>Built-in</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 499 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 500 | <para> |
| 501 | The currently best implementation is the MCI CDAUDIO driver that can |
| 502 | be found in dlls/winmm/mcicda/mcicda.c. The implementation is mostly |
| 503 | complete, there have been no reports of errors. It makes use of |
| 504 | misc/cdrom.c Wine internal cdrom interface. |
| 505 | This interface has been ported on Linux, FreeBSD and NetBSD. (Sun |
| 506 | should be similar, but are not implemented.) |
| 507 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 508 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 509 | <para> |
| 510 | A very small example of a cdplayer consists just of the line |
| 511 | mciSendString("play cdaudio",NULL,0,0); |
| 512 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 513 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 514 | <para>TODO: |
| 515 | <itemizedlist> |
| 516 | <listitem> |
| 517 | <para> |
| 518 | add support for other cdaudio drivers (Solaris...) |
| 519 | </para> |
| 520 | </listitem> |
| 521 | <listitem> |
| 522 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 523 | add support for multiple cdaudio devices (plus a decent |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 524 | configuration scheme) |
| 525 | </para> |
| 526 | </listitem> |
| 527 | <listitem> |
| 528 | <para> |
| 529 | The DLL is not cleanly separated from the NTDLL DLL. The CDROM |
| 530 | interface should be exported someway (or stored in a Wine only DLL) |
| 531 | </para> |
| 532 | </listitem> |
| 533 | </itemizedlist> |
| 534 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 535 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 536 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 537 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 538 | <sect3> |
| 539 | <title>Native</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 540 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 541 | <para> |
| 542 | Native MCICDA works also correctly... It uses the MSCDEX traps (on int |
| 543 | 2f). However, some commands (like seeking) seem to be broken. |
| 544 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 545 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 546 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 547 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 548 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 549 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 550 | <sect2> |
| 551 | <title>MCIWAVE</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 552 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 553 | <sect3> |
| 554 | <title>Built-in</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 555 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 556 | <para> |
| 557 | The implementation is rather complete and can be found in |
| 558 | dlls/winmm/mciwave/audio.c. It uses the low level audio API (although |
| 559 | not abstracted correctly). |
| 560 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 561 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 562 | <para>FIXME: |
| 563 | <itemizedlist> |
| 564 | <listitem> |
| 565 | <para> |
| 566 | The MCI_STATUS command is broken. |
| 567 | </para> |
| 568 | </listitem> |
| 569 | </itemizedlist> |
| 570 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 571 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 572 | <para>TODO: |
| 573 | <itemizedlist> |
| 574 | <listitem> |
| 575 | <para> |
| 576 | check for correctness |
| 577 | </para> |
| 578 | </listitem> |
| 579 | <listitem> |
| 580 | <para> |
| 581 | better use of asynchronous playback from low level |
| 582 | </para> |
| 583 | </listitem> |
| 584 | <listitem> |
| 585 | <para> |
| 586 | better implement non waiting command (without the MCI_WAIT flag). |
| 587 | </para> |
| 588 | </listitem> |
| 589 | </itemizedlist> |
| 590 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 591 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 592 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 593 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 594 | <sect3> |
| 595 | <title>Native</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 596 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 597 | <para> |
| 598 | Native MCIWAVE works also correctly. |
| 599 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 600 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 601 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 602 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 603 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 604 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 605 | <sect2> |
| 606 | <title>MCISEQ (MIDI sequencer)</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 607 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 608 | <sect3> |
| 609 | <title>Built-in</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 610 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 611 | <para> |
| 612 | The implementation can be found in dlls/winmm/mciseq/mcimidi.c. Except |
| 613 | from the Record command, should be close to completion (except for non |
| 614 | blocking commands, as many MCI drivers). |
| 615 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 616 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 617 | <para>TODO: |
| 618 | <itemizedlist> |
| 619 | <listitem> |
| 620 | <para> |
| 621 | implement it correctly |
| 622 | </para> |
| 623 | </listitem> |
| 624 | <listitem> |
| 625 | <para> |
| 626 | finish asynchronous commands (especially for reading/record) |
| 627 | </para> |
| 628 | </listitem> |
| 629 | <listitem> |
| 630 | <para> |
| 631 | better implement non waiting command (without the MCI_WAIT flag). |
| 632 | </para> |
| 633 | </listitem> |
| 634 | <listitem> |
| 635 | <para> |
| 636 | implement the recording features |
| 637 | </para> |
| 638 | </listitem> |
| 639 | </itemizedlist> |
| 640 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 641 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 642 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 643 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 644 | <sect3> |
| 645 | <title>Native</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 646 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 647 | <para> |
| 648 | Native MCIMIDI has been working but is currently blocked by scheduling |
| 649 | issues (mmTaskXXX no longer work). |
| 650 | </para><para>FIXME: |
| 651 | <itemizedlist> |
| 652 | <listitem> |
| 653 | <para> |
| 654 | midiStreamPlay get from time to time an incorrect MidiHdr when |
| 655 | using the native MCI sequencer |
| 656 | </para> |
| 657 | </listitem> |
| 658 | </itemizedlist> |
| 659 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 660 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 661 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 662 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 663 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 664 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 665 | <sect2> |
| 666 | <title>MCIANIM</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 667 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 668 | <sect3> |
| 669 | <title>Built-in</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 670 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 671 | <para> |
| 672 | The implementation is in dlls/winmm/mcianim/. |
| 673 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 674 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 675 | <para>TODO: |
| 676 | <itemizedlist> |
| 677 | <listitem> |
| 678 | <para> |
| 679 | implement it, probably using xanim or something similar. |
| 680 | </para> |
| 681 | </listitem> |
| 682 | </itemizedlist> |
| 683 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 684 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 685 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 686 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 687 | <sect3> |
| 688 | <title>Native</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 689 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 690 | <para> |
| 691 | Native MCIANIM is reported to work (but requires native video DLLs |
| 692 | also, even though the built-in video DLLs start to work correctly). |
| 693 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 694 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 695 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 696 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 697 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 698 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 699 | <sect2> |
| 700 | <title>MCIAVI</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 701 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 702 | <sect3> |
| 703 | <title>Built-in</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 704 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 705 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 706 | The implementation is in dlls/winmm/mcianim/. Basic features are present, |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 707 | simple playing is available, even if lots remain to be done. It rather |
| 708 | heavily relies on MSVIDEO/MSVFW32 DLLs pair to work. |
| 709 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 710 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 711 | <para>TODO: |
| 712 | <itemizedlist> |
| 713 | <listitem> |
| 714 | <para> |
| 715 | finish the implementation |
| 716 | </para> |
| 717 | </listitem> |
| 718 | <listitem> |
| 719 | <para> |
| 720 | fix the audio/video synchronisation issue |
| 721 | </para> |
| 722 | </listitem> |
| 723 | </itemizedlist> |
| 724 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 725 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 726 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 727 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 728 | <sect3> |
| 729 | <title>Native</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 730 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 731 | <para> |
| 732 | Native MCIAVI is reported to work (but requires native video DLLs |
| 733 | also). Some files exhibit some deadlock issues anyway. |
| 734 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 735 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 736 | </sect3> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 737 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 738 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 739 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 740 | </sect1> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 741 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 742 | <sect1 id="mm-high"> |
| 743 | <title>High level layers</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 744 | |
| 745 | <para> |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 746 | The rest (basically the MMSYSTEM and WINMM DLLs entry points). It also |
| 747 | provides the skeleton for the core functionality for multimedia |
| 748 | rendering. Note that native MMSYSTEM and WINMM do not currently work |
| 749 | under WINE and there is no plan to support them (it would require to |
| 750 | also fully support VxD, which is not done yet). |
| 751 | Moreover, native DLLs require 16 bit MCI and low level drivers. Wine |
| 752 | implements them as 32 bit drivers. |
| 753 | MCI and low level drivers can either be 16 or 32 bit for Wine. |
| 754 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 755 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 756 | <para>TODO: |
| 757 | <itemizedlist> |
| 758 | <listitem> |
| 759 | <para> |
| 760 | it seems that some program check what's installed in registry |
| 761 | against value returned by drivers. Wine is currently broken |
| 762 | regarding this point. |
| 763 | </para> |
| 764 | </listitem> |
| 765 | <listitem> |
| 766 | <para> |
| 767 | add clean-up mechanisms when process detaches from MM DLLs |
| 768 | </para> |
| 769 | </listitem> |
| 770 | <listitem> |
| 771 | <para> |
| 772 | prepare for the 16/32 big split |
| 773 | </para> |
| 774 | </listitem> |
| 775 | <listitem> |
| 776 | <para> |
| 777 | check thread-safeness for MMSYSTEM and WINMM entry points |
| 778 | </para> |
| 779 | </listitem> |
| 780 | <listitem> |
| 781 | <para> |
| 782 | unicode entry points are badly supported |
| 783 | </para> |
| 784 | </listitem> |
| 785 | </itemizedlist> |
| 786 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 787 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 788 | <sect2> |
| 789 | <title>MCI skeleton</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 790 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 791 | <para> |
| 792 | Implementation of what is needed to load/unload MCI drivers, and to |
| 793 | pass correct information to them. This is implemented in |
| 794 | dlls/winmm/mci.c. The mciSendString function uses command strings, |
| 795 | which are translated into normal MCI commands as used by |
| 796 | mciSendCommand with the help of command tables. The API can be found |
| 797 | in dlls/winmm/mmsystem.c and dlls/winmm/mci.c. The functions there |
| 798 | (mciOpen,mciSysInfo) handle mid level driver allocation and calls. The |
| 799 | implementation is not complete. |
| 800 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 801 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 802 | <para> |
| 803 | MCI drivers are seen as regular WINE modules, and can be loaded (with |
| 804 | a correct load order between built-in, native, elfdll, so), as any |
| 805 | other DLL. Please note, that MCI drivers module names must bear the |
| 806 | .drv extension to be correctly understood. |
| 807 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 808 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 809 | <para> |
| 810 | The list of available MCI drivers is obtained as follows: |
| 811 | 1. key 'mci' in [option] section from .winerc (or wineconf) |
| 812 | mci=CDAUDIO:SEQUENCER gives the list of MCI drivers (names, in |
| 813 | uppercase only) to be used in WINE. |
| 814 | 2. This list, when defined, supersedes the mci key in |
| 815 | c:\windows\system.ini |
| 816 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 817 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 818 | <para> |
| 819 | Note that native VIDEODISC crashes when the module is loaded, which |
| 820 | occurs when the MCI procedures are initialised. Make sure that this is |
| 821 | not in the list from above. Try adding: |
| 822 | mci=CDAUDIO:SEQUENCER:WAVEAUDIO:AVIVIDEO:MPEGVIDEO |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 823 | to the [options] section of the wine config file. |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 824 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 825 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 826 | <para>TODO: |
| 827 | <itemizedlist> |
| 828 | <listitem> |
| 829 | <para> |
| 830 | correctly handle the MCI_ALL_DEVICE_ID in functions. |
| 831 | </para> |
| 832 | </listitem> |
| 833 | <listitem> |
| 834 | <para> |
| 835 | finish mapping 16 <=> 32 of MCI structures and commands |
| 836 | </para> |
| 837 | </listitem> |
| 838 | <listitem> |
| 839 | <para> |
| 840 | MCI_SOUND is not handled correctly (should not be sent to MCI |
| 841 | driver => same behavior as MCI_BREAK) |
| 842 | </para> |
| 843 | </listitem> |
| 844 | <listitem> |
| 845 | <para> |
| 846 | implement auto-open feature (ie, when a string command is issued |
| 847 | for a not yet opened device, MCI automatically opens it) |
| 848 | </para> |
| 849 | </listitem> |
| 850 | </itemizedlist> |
| 851 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 852 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 853 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 854 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 855 | <sect2> |
| 856 | <title>MCI multi-tasking</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 857 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 858 | <para> |
| 859 | Multi-tasking capabilities used for the MCI drivers are provided in |
| 860 | dlls/winmm/mmsystem.c. |
| 861 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 862 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 863 | <para>TODO: |
| 864 | <itemizedlist> |
| 865 | <listitem> |
| 866 | <para> |
| 867 | mmTaskXXX functions are currently broken because the 16 loader does |
| 868 | not support binary command lines => provide Wine's own mmtask.tsk not |
| 869 | using binary command line. |
| 870 | </para> |
| 871 | </listitem> |
| 872 | <listitem> |
| 873 | <para> |
| 874 | the Wine native MCI drivers should use the mmThreadXXX API (but since |
| 875 | all built-in MCI drivers are 32 bit, this would require a special |
| 876 | flag to mark 32 bit entry points) |
| 877 | </para> |
| 878 | </listitem> |
| 879 | </itemizedlist> |
| 880 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 881 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 882 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 883 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 884 | <sect2> |
| 885 | <title>Timers</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 886 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 887 | <para> |
| 888 | It currently uses a service thread, run in the context of the calling |
| 889 | process, which should correctly mimic Windows behavior. |
| 890 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 891 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 892 | <para>TODO: |
| 893 | <itemizedlist> |
| 894 | <listitem> |
| 895 | <para> |
| 896 | Check if minimal time is satisfactory for most programs. |
| 897 | </para> |
| 898 | </listitem> |
| 899 | <listitem> |
| 900 | <para> |
| 901 | current implementation may let a timer tick (once) after it has |
| 902 | been destroyed |
| 903 | </para> |
| 904 | </listitem> |
| 905 | </itemizedlist> |
| 906 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 907 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 908 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 909 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 910 | <sect2> |
| 911 | <title>MMIO</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 912 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 913 | <para> |
| 914 | The API consists of the mmio* functions found in mdlls/winmm/mmio.c. |
| 915 | Seems to work ok in most of the cases. There's some linear/segmented |
| 916 | issues with 16 bit code. There are also some bugs when writting MMIO |
| 917 | files. |
| 918 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 919 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 920 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 921 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 922 | <sect2> |
| 923 | <title>sndPlayXXX functions</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 924 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 925 | <para> |
| 926 | Seem to work correctly. |
| 927 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 928 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 929 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 930 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 931 | </sect1> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 932 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 933 | <sect1 id="mm-conf"> |
| 934 | <title>Multimedia configuration</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 935 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 936 | <para> |
| 937 | Currently, multimedia configuration heavily relies on Win 3.x |
| 938 | configuration model. |
| 939 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 940 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 941 | <sect2> |
| 942 | <title>Drivers</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 943 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 944 | <para> |
| 945 | Since all multimedia drivers (MCI, low level ones, ACM drivers, |
| 946 | mappers) are, at first, drivers they need to appear in the [mci] or |
| 947 | [mci32] section of the system.ini file. |
| 948 | Since all drivers are, at first, DLLs, you can choose to load their |
| 949 | Wine's (built-in) or Windows (native) version. |
| 950 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 951 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 952 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 953 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 954 | <sect2> |
| 955 | <title>MCI</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 956 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 957 | <para> |
| 958 | A default [mci] section (in system.ini) looks like (see the note above |
| 959 | on videodisc): |
| 960 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 961 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 962 | <screen> |
| 963 | [mci] |
| 964 | cdaudio=mcicda.drv |
| 965 | sequencer=mciseq.drv |
| 966 | waveaudio=mciwave.drv |
| 967 | avivideo=mciavi.drv |
| 968 | videodisc=mcipionr.drv |
| 969 | vcr=mcivisca.drv |
| 970 | MPEGVideo=mciqtz.drv |
| 971 | </screen> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 972 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 973 | <para> |
| 974 | By default, the list of loadable MCI drivers will be made of those |
| 975 | drivers (in the [mci] section). |
| 976 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 977 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 978 | <para> |
| 979 | The list of loadable (recognized) MCI drivers can be altered in the |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 980 | [option] section of the wine config file, like: |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 981 | mci=CDAUDIO:SEQUENCER:WAVEAUDIO:AVIVIDEO:MPEGVIDEO |
| 982 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 983 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 984 | <para>TODO: |
| 985 | <itemizedlist> |
| 986 | <listitem> |
| 987 | <para> |
| 988 | use a default registry setting to bypass this (ugly) configuration |
| 989 | model |
| 990 | </para> |
| 991 | </listitem> |
| 992 | </itemizedlist> |
| 993 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 994 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 995 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 996 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 997 | <sect2> |
| 998 | <title>Low level drivers</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 999 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1000 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1001 | Configuration of low level drivers is done with the Wine configuration file. |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1002 | Default keys are provided in winedefault.reg. |
| 1003 | </para> |
| 1004 | |
| 1005 | <para> |
| 1006 | The registry keys used here differ from the Windows' one. Using the Windows' one |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1007 | would require implementing something equivalent to a (real) driver installation. |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1008 | Even if this would be necessary in a few cases (mainly using MS native multimedia) |
| 1009 | modules, there's no real need so far (or it hasn't been run into yet). |
| 1010 | </para> |
| 1011 | |
| 1012 | <para> |
| 1013 | See the configuration part of the User's Guide for more details. |
| 1014 | </para> |
| 1015 | |
| 1016 | </sect2> |
| 1017 | |
| 1018 | <sect2> |
| 1019 | <title>Midi mapper</title> |
| 1020 | |
| 1021 | <para> |
| 1022 | The Midi mapper configuration is the same as on Windows 9x. Under the key |
| 1023 | <screen> |
| 1024 | HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Multimedia\MIDIMap |
| 1025 | </screen> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1026 | if the 'UseScheme' value is not set, or is set to a null value, the midi |
| 1027 | mapper will always use the driver identified by the 'CurrentInstrument' |
| 1028 | value. Note: Wine (for simplicity while installing) allows to define |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1029 | 'CurrentInstrument' as "#n" (where n is a number), whereas Windows only |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1030 | allows the real device name here. If UseScheme is set to a non null value, |
| 1031 | 'CurrentScheme' defines the name of the scheme to map the different channels. |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1032 | All the schemes are available with keys like |
| 1033 | <screen> |
| 1034 | HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Midi\Schemes\%name_of_scheme% |
| 1035 | </screen> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1036 | For every scheme, under this key, will be a sub-key (which name is usually |
| 1037 | a two digit index, starting at 00). Its default value is the name of the |
| 1038 | output driver, and the value 'Channels' lists all channels (of the 16 |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1039 | standard MIDI ones) which have to be copied to this driver. |
| 1040 | </para> |
| 1041 | |
| 1042 | <para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1043 | To provide enhanced configuration and mapping capabilities, each driver |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1044 | can define under the key |
| 1045 | <screen> |
| 1046 | HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Midi\Ports\%driver_name% |
| 1047 | </screen> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1048 | a link to and .IDF file which allows to remap channels internally (for |
| 1049 | example 9 -> 16), to change instruments identification, event |
| 1050 | controlers values. See the source file dlls/winmm/midimap/midimap.c |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1051 | for the details (this isn't implemented yet). |
| 1052 | </para> |
| 1053 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1054 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1055 | <sect2> |
| 1056 | <title>ACM</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1057 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1058 | <para> |
| 1059 | To be done (use the same mechanism as MCI drivers configuration). |
| 1060 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1061 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1062 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1063 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1064 | <sect2> |
| 1065 | <title>VIDC</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1066 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1067 | <para> |
| 1068 | To be done (use the same mechanism as MCI drivers configuration). |
| 1069 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1070 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1071 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1072 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1073 | </sect1> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1074 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1075 | <sect1 id="mm-arch"> |
| 1076 | <title>Multimedia architecture</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1077 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1078 | <sect2> |
| 1079 | <title>Windows 9x multimedia architecture</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1080 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1081 | <screen> |
| 1082 | | |
| 1083 | Kernel space | Client applications |
| 1084 | | |
| 1085 | | | | ^ ^ | | | | |
| 1086 | | 16>| |<32 16>| |<32 16>| |<32 16>| |<32 |
| 1087 | | | v | | | v | v |
| 1088 | | +----|-----------|---------|------------|-------+ |
| 1089 | | | | | | | | WinMM.dll |
| 1090 | | | | | | | | 32 bit |
| 1091 | | +----|-----------|---------|------------|-------+ |
| 1092 | | | | | ^ | | | |
| 1093 | | +------+ | |<16 | | | |<16 | |
| 1094 | | | 16>| | | | | | | | |
| 1095 | | | v v v | | v v v |
| 1096 | | | +---------------+---+-------------+-------------+ |
| 1097 | | | | waveInXXX | | mciXXX | *playSound* | |
| 1098 | | | | waveOutXXX | | | mmioXXX | |
| 1099 | | | | midiInXXX | | | timeXXX | |
| 1100 | | | | midiOutXXX | | | driverXXX | |
| 1101 | | | | midiStreamXXX | | | | MMSystem.dll |
| 1102 | | | | mixerXXX | | | | 16 bit |
| 1103 | +--------+ | | | auxXXX +---+ +---+ mmThread| | |
| 1104 | |MMDEVLDR|<------->| joyXXX | Call back | mmTask | | |
| 1105 | +--------+ | | +-----------+-----------+---------+-------------+ |
| 1106 | ^ | | | ^ ^ | ^ |
| 1107 | | | | 16>| |<16>| 16>| |<16 |
| 1108 | v | | v | | v | |
| 1109 | +--------+ | | +-------------+ +----------+ |
| 1110 | | VxD |<------->| *.drv | | mci*.drv | |
| 1111 | +--------+ | | +--------------+ +-----------+ |
| 1112 | | | | msacm.drv | | mciwave | |
| 1113 | | | +--------------+ +-----------+ |
| 1114 | | | | midimap.drv | | mcimidi | |
| 1115 | | | +-------------+ +-----------+ |
| 1116 | | | Low-level drivers | ... | MCI drivers |
| 1117 | | | +----------+ |
| 1118 | | | | |
| 1119 | | | |<16 |
| 1120 | | +-------------------------------+ |
| 1121 | | |
| 1122 | </screen> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1123 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1124 | <para> |
| 1125 | The important points to notice are: |
| 1126 | <itemizedlist> |
| 1127 | <listitem> |
| 1128 | <para> |
| 1129 | all drivers (and most of the core code) is 16 bit |
| 1130 | </para> |
| 1131 | </listitem> |
| 1132 | <listitem> |
| 1133 | <para> |
| 1134 | all hardware (or most of it) dependant code reside in the kernel |
| 1135 | space (which is not surprising) |
| 1136 | </para> |
| 1137 | </listitem> |
| 1138 | </itemizedlist> |
| 1139 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1140 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1141 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1142 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1143 | <sect2> |
| 1144 | <title>Wine multimedia architecture</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1145 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1146 | <screen> |
| 1147 | | |
| 1148 | Kernel space | Client applications |
| 1149 | | |
| 1150 | | | | ^ ^ | | | | |
| 1151 | | 16>| |<32 16>| |<32 16>| |<32 16>| |<32 |
| 1152 | | | | | | | | | | |
| 1153 | | +------+ | | | | | | | | |
| 1154 | | |32/16>| | | | | | | | | |
| 1155 | | | v v v | | v v v v |
| 1156 | | | +---------------+---+-------------+-------------+ |
| 1157 | | | | waveInXXX | | mciXXX | *playSound* | |
| 1158 | | | | waveOutXXX | | | mmioXXX | WinMM.dll |
| 1159 | | | | midiInXXX | | | timeXXX | 32 bit |
| 1160 | | | | midiOutXXX | | | driverXXX | |
| 1161 | | | | midiStreamXXX | | | | MMSystem.dll |
| 1162 | | | | mixerXXX | | | | 16 bit |
| 1163 | | | | auxXXX +---+ +---+ mmThread| | |
| 1164 | | | | joyXXX | Call back | mmTask | | |
| 1165 | | | +-----------+-----------+---------+-------------+ |
| 1166 | | | || ^ ^ || ^^ |
| 1167 | | | 16>||<32 |<16>| 16>||<32>||<16 |
| 1168 | | | vv |<32>| vv || |
| 1169 | +---------+ | | +-------------+ +----------+ |
| 1170 | |HW driver|<------->| *.drv | | mci*.drv | |
| 1171 | +---------+ | | +--------------+ +-----------+ |
| 1172 | | | | msacm.drv | | mciwave | |
| 1173 | | | +--------------+ +-----------+ |
| 1174 | | | | midimap.drv | | mcimidi | |
| 1175 | | | +-------------+ +-----------+ |
| 1176 | | | Low-level drivers | ... | MCI drivers |
| 1177 | | | +----------+ |
| 1178 | | | | |
| 1179 | | | |<32/16 |
| 1180 | | +-------------------------------+ |
| 1181 | | |
| 1182 | </screen> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1183 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1184 | <para> |
| 1185 | From the previous drawings, the most noticeable differences are: |
| 1186 | <itemizedlist> |
| 1187 | <listitem> |
| 1188 | <para> |
| 1189 | low-level drivers can either be 16 or 32 bit |
| 1190 | </para> |
| 1191 | </listitem> |
| 1192 | <listitem> |
| 1193 | <para> |
| 1194 | MCI drivers can either be 16 or 32 bit |
| 1195 | </para> |
| 1196 | </listitem> |
| 1197 | <listitem> |
| 1198 | <para> |
| 1199 | MMSystem and WinMM will be hosted in a single elfglue library |
| 1200 | </para> |
| 1201 | </listitem> |
| 1202 | <listitem> |
| 1203 | <para> |
| 1204 | no link between the MMSystem/WinMM pair on kernel space shall |
| 1205 | exist. For example, there will be a low level driver to talk to a |
| 1206 | UNIX OSS (Open Sound System) driver |
| 1207 | </para> |
| 1208 | </listitem> |
| 1209 | <listitem> |
| 1210 | <para> |
| 1211 | all built-in drivers (low-level and MCI) will be written as 32 bit |
| 1212 | drivers |
| 1213 | </para> |
| 1214 | </listitem> |
| 1215 | <listitem> |
| 1216 | <para> |
| 1217 | all native drivers will be 16 bits drivers |
| 1218 | </para> |
| 1219 | </listitem> |
| 1220 | </itemizedlist> |
| 1221 | </para> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1222 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1223 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1224 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1225 | </sect1> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1226 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1227 | <sect1 id="msacm"> |
| 1228 | <title>MS ACM Dlls</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1229 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1230 | <sect2> |
| 1231 | <title>Contents</title> |
| 1232 | |
| 1233 | <para>tbd</para> |
| 1234 | </sect2> |
| 1235 | |
| 1236 | <sect2> |
| 1237 | <title>Status</title> |
| 1238 | |
| 1239 | <para>tbd</para> |
| 1240 | </sect2> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1241 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1242 | <sect2> |
| 1243 | <title>Caching</title> |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1244 | |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1245 | <para> |
| 1246 | The MSACM/MSACM32 keeps some data cached for all known ACM |
| 1247 | drivers. Under the key |
| 1248 | <screen> |
| 1249 | Software\Microsoft\AudioCompressionManager\DriverCache\<driver |
| 1250 | name> |
| 1251 | </screen> |
| 1252 | are kept for values: |
| 1253 | <itemizedlist> |
| 1254 | <listitem> |
| 1255 | <para> |
| 1256 | aFormatTagCache which contains an array of |
| 1257 | DWORD. There are two DWORDs per cFormatTags |
| 1258 | entry. The first DWORD contains a format tag |
| 1259 | value, and the second the associated maximum |
| 1260 | size for a WAVEFORMATEX structure. |
| 1261 | (Fields dwFormatTag and cbFormatSize from |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1262 | ACMFORMATDETAILS) |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1263 | </para> |
| 1264 | </listitem> |
| 1265 | <listitem> |
| 1266 | <para> |
| 1267 | cFilterTags contains the number of tags supported by the driver |
| 1268 | for filtering. |
| 1269 | </para> |
| 1270 | </listitem> |
| 1271 | <listitem> |
| 1272 | <para> |
| 1273 | cFormatTags contains the number of tags support |
| 1274 | by the driver for conversions. |
| 1275 | </para> |
| 1276 | </listitem> |
| 1277 | <listitem> |
| 1278 | <para> |
| 1279 | fdwSupport (the same as the one returned from |
Andreas Mohr | 5ec74d6 | 2002-07-24 03:00:02 +0000 | [diff] [blame] | 1280 | acmDriverDetails). |
Eric Pouech | 30975c0 | 2001-05-22 19:26:31 +0000 | [diff] [blame] | 1281 | </para> |
| 1282 | </listitem> |
| 1283 | </itemizedlist> |
| 1284 | </para> |
| 1285 | |
| 1286 | <para> |
| 1287 | The cFilterTags, cFormatTags, fdwSupport are the same |
| 1288 | values as the ones returned from acmDriverDetails |
| 1289 | function. |
| 1290 | </para> |
| 1291 | </sect2> |
| 1292 | </sect1> |
| 1293 | |
| 1294 | |
| 1295 | </chapter> |
| 1296 | |
| 1297 | <!-- Keep this comment at the end of the file |
| 1298 | Local variables: |
| 1299 | mode: sgml |
| 1300 | sgml-parent-document:("wine-doc.sgml" "set" "book" "part" "chapter" "") |
| 1301 | End: |
| 1302 | --> |