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.
13 Following lowlevel layers are implemented:
16 The API consists of the waveIn*/waveOut* functions found in
17 multimedia/mmsystem.c. They call the real lowlevel audiodriver using
18 the wodMessage/widMessage function in multimedia/audio.c, which handles
19 the different requests.
21 The lowlevel audio driver is currently only implemented for the
22 OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by
23 4Front Technologies (http://www.4front-tech.com/). The presence of this
24 driver is checked by configure (depends on the <sys/soundcard.h> file).
26 The implementation contains all features commonly used, but has several
27 problems. For instance:
28 Writes and reads are not done asynchronously as they are supposed to
29 be done. This breaks some programs (soundrec.exe from the Windows applets),
30 but doesn't worry other programs. Some callbacks are probably done
31 incorrectly (there are reports of some broken multimedia applications,
32 but I haven't found one yet.)
35 - add asynchronous writes and reads (must use threads)
36 - check the callback functions
37 - verify all functions for correctness
38 - add drivers for other soundsystems (Sun Audio, remote audio systems
39 (using X extensions, ...)
43 The API consists of the mixer* functions found in multimedia/mmsystem.c.
44 They call the lowlevel driver functions in multimedia/mixer.c using the
47 The current implementation tries to use the OpenSoundSystem mixer, but is
48 missing nearly everything. There is no report of a working application.
51 - implement mixing functionality for OSS correctly.
52 - implement mixing lowlevel drivers for other mixers.
56 The API consists of the midi* functions found in multimedia/mmsystem.c.
57 They call the lowlevel driver functions in multimedia/midi.c using the
58 midMessage and the modMessage functions.
60 The lowlevel audio driver is currently only implemented for the
61 OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by
62 4Front Technologies (http://www.4front-tech.com/). The presence of this
63 driver is checked by configure (depends on the <sys/soundcard.h> file).
64 Both Midi in and Midi out are provided. The type of MIDI devices supported
65 is external MIDI port (requires an MIDI capable device - keyboard...) and
66 OPL/2 synthesis (the OPL/2patches for all instruments are in midiPatch.c).
69 - Do not implement a software synthesizer. This should be done
70 using MIDI loopback devices in an external program (like timidity).
71 the only trouble is that timidity is GPL'ed...
72 - use better instrument definition for OPL/2 (midiPatch.c)
73 - have a look at OPL/3 ?
74 - a hack is used in mmsystem.c (setting reserved to the 32 bit linear
75 address of the block whatever the call is made from 16 or 32 bits
76 code...). this should be in midi.c I think
80 The API consists of the timer* functions found in multimedia/timer.c.
81 There is currently only one implementation, which uses normal windows timers.
82 The implementation works for most cases found. The only problem is that
83 it doesn't support asynchronous timer events (as it is supposed to do).
85 There is a workaround for this lack in timeGetTime() to make Diablo work
86 and 'Pinball! SpaceCadet' at least start up.
89 - Implemented asynchronous timers (using a thread probably)
93 The API consists of the mmio* functions found in multimedia/mmio.c.
95 FIXME: I am not sure about the status of this implementation.
103 The API consists of the aux* functions found in multimedia/mmsystem.c.
104 They call auxMessage in multimedia/mmaux.c.
106 The aux* functions are the predecessor of the mixer* functions.
108 The implementation uses the OSS mixer API, and is incomplete.
111 - verify the implementation
115 The API consists of the joy* functions found in multimedia/joystick.c.
116 The implementation currently uses the Linux joystick device driver API.
117 It is lacking support for enhanced joysticks and has not been extensively
121 - better support of enhanced joysticks
122 - support more joystick drivers (like the XInput extension)
124 2. Midlevel drivers (MCI)
126 The midlevel drivers are represented by some common API functions,
127 mostly mciSendCommand and mciSendString. The mciSendString function
128 uses commandstrings, which are translated into normal MCI commands as
129 used by mciSendCommand. The API can be found in multimedia/mmsystem.c
130 and multimedia/mcistring.c.
131 The functions there (mciOpen,mciSysInfo) handle midlevel driver
132 allocation and calls.
134 The implementation is not complete, but works for most cases.
135 Win32 support for mciSendCommand is missing (mciSendString works
136 in the Win32 case, since the use of strings doesn't differ between
141 - support windows MCI drivers (should be possible for they usually
142 do not use lowlevel calls)
143 - MCI command loading support
144 - implement other stuff as yet unknown
146 WINE implements several MCI midlevel drivers:
150 The currently best implementation is the MCI CDAUDIO driver that can
151 be found in multimedia/mcicda.c. The implementation is mostly complete,
152 there have been no reports of errors.
153 The implementation currently uses only the Linux /dev/cdrom controlling
154 functions. (Sun and BSD like should be similair, but are not implemented.)
156 A very small example of a cdplayer consists just of the line
157 mciSendString("play cdaudio",NULL,0,0);
160 - add support for other cdaudio drivers
164 The implementation is rather complete and can be found in multimedia/audio.c.
165 It uses the lowlevel audio API (although not abstracted correctly).
166 FIXME: The MCI_STATUS command is broken.
168 TODO: - check for correctness
172 The implementation can be found in multimedia/midi.c. I am not sure
173 about the completeness.
174 It uses the lowlevel midi driver and is probably broken too.
177 - implement it correctly
181 The implementation consists of stubs and is in multimedia/mcianim.c.
184 - implement it, probably using xanim or something similair. Could
185 also be implemented by using the Windows MCI video drivers.