1 This file contains information about the implementation of the multimedia
4 The libraries consist of MMSYSTEM.DLL (win16), WINMM.DLL (win32) and some
5 (abstracted, not Windows compatible) lowlevel drivers. The implementation
6 can be found in the multimedia/ subdirectory.
8 The multimedia stuff is split into 3 layers. The lowlevel (device drivers),
9 midlevel (MCI commands) and highlevel abstraction layers.
11 The lowlevel may depend on current hardware and OS services (like OSS).
12 Mid-level and high-level must be written independantly from the hardware and OS
17 Following lowlevel layers are implemented:
21 The API consists of the waveIn*/waveOut* functions found in
22 multimedia/mmsystem.c. They call the real lowlevel audiodriver using
23 the wodMessage/widMessage function in multimedia/audio.c, which handles
24 the different requests.
26 The lowlevel audio driver is currently only implemented for the
27 OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by
28 4Front Technologies (http://www.4front-tech.com/). The presence of this
29 driver is checked by configure (depends on the <sys/soundcard.h> file).
31 The implementation contains all features commonly used, but has several
32 problems. For instance:
33 Writes are not done asynchronously as they are supposed to be done.
34 This breaks some programs (soundrec.exe from the Windows applets),
35 but doesn't worry other programs.
38 - add asynchronous writes (must use threads)
39 - verify all functions for correctness
40 - add drivers for other soundsystems (Sun Audio, remote audio systems
41 (using X extensions, ...), ALSA
42 - WaveHdr must be sent though mmsystem.c to get the linear address
43 set correctly. An application calling directly (wod|wid)Message
48 The API consists of the mixer* functions found in multimedia/mmsystem.c.
49 They call the lowlevel driver functions in multimedia/mixer.c using the
52 The current implementation tries to use the OpenSoundSystem mixer, but is
53 missing nearly everything. There is no report of a working application.
56 - implement mixing functionality for OSS correctly.
57 - implement mixing lowlevel drivers for other mixers.
61 The API consists of the midi* functions found in multimedia/mmsystem.c.
62 They call the lowlevel driver functions in multimedia/midi.c using the
63 midMessage and the modMessage functions.
65 The lowlevel audio driver is currently only implemented for the
66 OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by
67 4Front Technologies (http://www.4front-tech.com/). The presence of this
68 driver is checked by configure (depends on the <sys/soundcard.h> file).
69 Both Midi in and Midi out are provided. The type of MIDI devices supported
70 is external MIDI port (requires an MIDI capable device - keyboard...) and
71 OPL/2 synthesis (the OPL/2 patches for all instruments are in midiPatch.c).
74 - Do not implement a software synthesizer. This should be done
75 using MIDI loopback devices in an external program (like timidity).
76 the only trouble is that timidity is GPL'ed...
77 - use better instrument definition for OPL/2 (midiPatch.c) or
78 use existing instrument definition (from playmidi or kmid)
80 - have a look at OPL/3 ?
81 - MidiHdr must be sent though mmsystem.c to get the linear address
82 set correctly. An application calling directly (wod|wid)Message
84 - implement asynchronous playback of MidiHdr
88 The API consists of the timer* functions found in multimedia/timer.c.
89 There is currently only one implementation, which uses normal windows timers.
90 The implementation works for most cases found. The only problem is that
91 it doesn't support asynchronous timer events (as it is supposed to do).
93 There is a workaround for this lack in timeGetTime() to make Diablo work
94 and 'Pinball! SpaceCadet' at least start up.
97 - Implemented asynchronous timers (using the service thread)
101 The API consists of the mmio* functions found in multimedia/mmio.c.
103 FIXME: I am not sure about the status of this implementation.
111 The API consists of the aux* functions found in multimedia/mmsystem.c.
112 They call auxMessage in multimedia/mmaux.c.
114 The aux* functions are the predecessor of the mixer* functions.
116 The implementation uses the OSS mixer API, and is incomplete.
119 - verify the implementation
123 The API consists of the joy* functions found in multimedia/joystick.c.
124 The implementation currently uses the Linux joystick device driver API.
125 It is lacking support for enhanced joysticks and has not been extensively
129 - better support of enhanced joysticks
130 - support more joystick drivers (like the XInput extension)
132 2. Midlevel drivers (MCI)
134 The midlevel drivers are represented by some common API functions,
135 mostly mciSendCommand and mciSendString. The mciSendString function
136 uses commandstrings, which are translated into normal MCI commands as
137 used by mciSendCommand. The API can be found in multimedia/mmsystem.c
138 and multimedia/mcistring.c.
139 The functions there (mciOpen,mciSysInfo) handle midlevel driver
140 allocation and calls.
142 The implementation is not complete.
144 MCI drivers are seen as regular WINE modules, and can be loaded
145 (with a correct loadorder between builtin, native, elfdll, so), as
146 any other DLL. Please note, that MCI drivers module names must
147 bear the .drv extension to be correctly understood.
149 The list of available MCI drivers is obtained as follows:
150 1/ key 'mci' in [option] section from .winerc (or wineconf)
151 mci=CDAUDIO:SEQUENCER
152 gives the list of MCI drivers (names, in uppercase only) to
154 2/ This list, when defined, supercedes the mci
155 key in c:\windows\system.ini
158 - support windows MCI drivers (should be possible for they usually
159 do not use lowlevel calls)
160 - MCI command loading support
161 - better implement non waiting command (without the MCI_WAIT flag).
162 First shot is present in midi.c but requires much more work (and
163 will impact sndPlaySound() as well which shall be written as
164 as set of MCI commands).
165 - implement other stuff as yet unknown
166 - in mciString(), make use of hiword from mciSendMessage
167 return value to convert value into string...
168 - move mci drivers as regular DLLs (loading in wine, elfglue...)
170 WINE implements several MCI midlevel drivers:
174 The currently best implementation is the MCI CDAUDIO driver that can
175 be found in multimedia/mcicda.c. The implementation is mostly complete,
176 there have been no reports of errors.
178 It makes use of misc/cdrom.c Wine internal cdrom interface. This
179 interface has been ported on Linux, FreeBSD and NetBSD.
180 (Sun should be similair, but are not implemented.)
182 A very small example of a cdplayer consists just of the line
183 mciSendString("play cdaudio",NULL,0,0);
185 Native MCICDA is starting to output sounds... It uses the mscdex
189 - add support for other cdaudio drivers
193 The implementation is rather complete and can be found in
195 It uses the lowlevel audio API (although not abstracted correctly).
196 FIXME: The MCI_STATUS command is broken.
199 - check for correctness
200 - better use of asynchronous playback from low level
202 Native MCIWAVE has been working but is currently blocked by
207 The implementation can be found in multimedia/midi.c. Except from the
208 Record command, should be close to completion (except for non blocking
212 - implement it correctly
213 - finish asynchronous commands
215 Native MCIMIDI has been working but is currently blocked by
220 The implementation consists of stubs and is in multimedia/mcianim.c.
223 - implement it, probably using xanim or something similair. Could
224 also be implemented by using the Windows MCI video drivers.
228 The implementation consists of stubs and is in multimedia/mciavi.c.
231 - implement it, probably using xanim or something similair. Could
232 also be implemented by using the Windows MCI video drivers.
236 The rest (basically the MMSYSTEM and WINMM DLLs entry points).