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:
20 The API consists of the waveIn*/waveOut* functions found in
21 multimedia/mmsystem.c. They call the real lowlevel audiodriver using
22 the wodMessage/widMessage function in multimedia/audio.c, which handles
23 the different requests.
25 The lowlevel audio driver is currently only implemented for the
26 OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by
27 4Front Technologies (http://www.4front-tech.com/). The presence of this
28 driver is checked by configure (depends on the <sys/soundcard.h> file).
30 The implementation contains all features commonly used, but has several
31 problems. For instance:
32 Writes and reads are not done asynchronously as they are supposed to
33 be done. This breaks some programs (soundrec.exe from the Windows applets),
34 but doesn't worry other programs. Some callbacks are probably done
35 incorrectly (there are reports of some broken multimedia applications,
36 but I haven't found one yet.)
39 - add asynchronous writes and reads (must use threads)
40 - check the callback functions
41 - verify all functions for correctness
42 - add drivers for other soundsystems (Sun Audio, remote audio systems
43 (using X extensions, ...)
47 The API consists of the mixer* functions found in multimedia/mmsystem.c.
48 They call the lowlevel driver functions in multimedia/mixer.c using the
51 The current implementation tries to use the OpenSoundSystem mixer, but is
52 missing nearly everything. There is no report of a working application.
55 - implement mixing functionality for OSS correctly.
56 - implement mixing lowlevel drivers for other mixers.
60 The API consists of the midi* functions found in multimedia/mmsystem.c.
61 They call the lowlevel driver functions in multimedia/midi.c using the
62 midMessage and the modMessage functions.
64 The lowlevel audio driver is currently only implemented for the
65 OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by
66 4Front Technologies (http://www.4front-tech.com/). The presence of this
67 driver is checked by configure (depends on the <sys/soundcard.h> file).
68 Both Midi in and Midi out are provided. The type of MIDI devices supported
69 is external MIDI port (requires an MIDI capable device - keyboard...) and
70 OPL/2 synthesis (the OPL/2patches for all instruments are in midiPatch.c).
73 - Do not implement a software synthesizer. This should be done
74 using MIDI loopback devices in an external program (like timidity).
75 the only trouble is that timidity is GPL'ed...
76 - use better instrument definition for OPL/2 (midiPatch.c)
77 - have a look at OPL/3 ?
78 - a hack is used in mmsystem.c (setting reserved to the 32 bit linear
79 address of the block whatever the call is made from 16 or 32 bits
80 code...). this should be made in midi.c I think
84 The API consists of the timer* functions found in multimedia/timer.c.
85 There is currently only one implementation, which uses normal windows timers.
86 The implementation works for most cases found. The only problem is that
87 it doesn't support asynchronous timer events (as it is supposed to do).
89 There is a workaround for this lack in timeGetTime() to make Diablo work
90 and 'Pinball! SpaceCadet' at least start up.
93 - Implemented asynchronous timers (using a thread probably)
97 The API consists of the mmio* functions found in multimedia/mmio.c.
99 FIXME: I am not sure about the status of this implementation.
107 The API consists of the aux* functions found in multimedia/mmsystem.c.
108 They call auxMessage in multimedia/mmaux.c.
110 The aux* functions are the predecessor of the mixer* functions.
112 The implementation uses the OSS mixer API, and is incomplete.
115 - verify the implementation
119 The API consists of the joy* functions found in multimedia/joystick.c.
120 The implementation currently uses the Linux joystick device driver API.
121 It is lacking support for enhanced joysticks and has not been extensively
125 - better support of enhanced joysticks
126 - support more joystick drivers (like the XInput extension)
128 2. Midlevel drivers (MCI)
130 The midlevel drivers are represented by some common API functions,
131 mostly mciSendCommand and mciSendString. The mciSendString function
132 uses commandstrings, which are translated into normal MCI commands as
133 used by mciSendCommand. The API can be found in multimedia/mmsystem.c
134 and multimedia/mcistring.c.
135 The functions there (mciOpen,mciSysInfo) handle midlevel driver
136 allocation and calls.
138 The implementation is not complete.
141 - support windows MCI drivers (should be possible for they usually
142 do not use lowlevel calls)
143 - MCI command loading support
144 - better implement non waiting command (without the MCI_WAIT flag).
145 First shot is present in midi.c but requires much more work (and
146 will impact sndPlaySound() as well which shall be written as
147 as set of MCI commands).
148 - implement other stuff as yet unknown
150 WINE implements several MCI midlevel drivers:
154 The currently best implementation is the MCI CDAUDIO driver that can
155 be found in multimedia/mcicda.c. The implementation is mostly complete,
156 there have been no reports of errors.
157 The implementation currently uses only the Linux /dev/cdrom controlling
158 functions. (Sun and BSD like should be similair, but are not implemented.)
160 A very small example of a cdplayer consists just of the line
161 mciSendString("play cdaudio",NULL,0,0);
164 - add support for other cdaudio drivers
168 The implementation is rather complete and can be found in
170 It uses the lowlevel audio API (although not abstracted correctly).
171 FIXME: The MCI_STATUS command is broken.
173 TODO: - check for correctness
177 The implementation can be found in multimedia/midi.c. Except from the
178 Record command, should be close to completion (except for non blocking
182 - implement it correctly
183 - finish asynchronous commands
187 The implementation consists of stubs and is in multimedia/mcianim.c.
190 - implement it, probably using xanim or something similair. Could
191 also be implemented by using the Windows MCI video drivers.
195 The rest (basically the MMSYSTEM and WINMM DLLs entry points.