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 current implementation is completely broken. (I think open(), read()
61 and write() of the /dev/midi device would make this implementation nearly
65 - Implement correct MIDI output
66 - Do not implement a software synthesizer. This should be done
67 using MIDI loopback devices in an external program (like timidity).
71 The API consists of the timer* functions found in multimedia/timer.c.
72 There is currently only one implementation, which uses normal windows timers.
73 The implementation works for most cases found. The only problem is that
74 it doesn't support asynchronous timer events (as it is supposed to do).
76 There is a workaround for this lack in timeGetTime() to make Diablo work
77 and 'Pinball! SpaceCadet' at least start up.
80 - Implemented asynchronous timers (using a thread probably)
84 The API consists of the mmio* functions found in multimedia/mmio.c.
86 FIXME: I am not sure about the status of this implementation.
94 The API consists of the aux* functions found in multimedia/mmsystem.c.
95 They call auxMessage in multimedia/mmaux.c.
97 The aux* functions are the predecessor of the mixer* functions.
99 The implementation uses the OSS mixer API, and is incomplete.
102 - verify the implementation
106 The API consists of the joy* functions found in multimedia/joystick.c.
107 The implementation currently uses the Linux joystick device driver API.
108 It is lacking support for enhanced joysticks and has not been extensively
112 - better support of enhanced joysticks
113 - support more joystick drivers (like the XInput extension)
115 2. Midlevel drivers (MCI)
117 The midlevel drivers are represented by some common API functions,
118 mostly mciSendCommand and mciSendString. The mciSendString function
119 uses commandstrings, which are translated into normal MCI commands as
120 used by mciSendCommand. The API can be found in multimedia/mmsystem.c
121 and multimedia/mcistring.c.
122 The functions there (mciOpen,mciSysInfo) handle midlevel driver
123 allocation and calls.
125 The implementation is not complete, but works for most cases.
126 Win32 support for mciSendCommand is missing (mciSendString works
127 in the Win32 case, since the use of strings doesn't differ between
132 - support windows MCI drivers (should be possible for they usually
133 do not use lowlevel calls)
134 - MCI command loading support
135 - implement other stuff as yet unknown
137 WINE implements several MCI midlevel drivers:
141 The currently best implementation is the MCI CDAUDIO driver that can
142 be found in multimedia/mcicda.c. The implementation is mostly complete,
143 there have been no reports of errors.
144 The implementation currently uses only the Linux /dev/cdrom controlling
145 functions. (Sun and BSD like should be similair, but are not implemented.)
147 A very small example of a cdplayer consists just of the line
148 mciSendString("play cdaudio",NULL,0,0);
151 - add support for other cdaudio drivers
155 The implementation is rather complete and can be found in multimedia/audio.c.
156 It uses the lowlevel audio API (although not abstracted correctly).
157 FIXME: The MCI_STATUS command is broken.
159 TODO: - check for correctness
163 The implementation can be found in multimedia/midi.c. I am not sure
164 about the completeness.
165 It uses the lowlevel midi driver and is probably broken too.
168 - implement it correctly
172 The implementation consists of stubs and is in multimedia/mcianim.c.
175 - implement it, probably using xanim or something similair. Could
176 also be implemented by using the Windows MCI video drivers.