The mid level drivers are represented by some common API functions, mostly mciSendCommand and mciSendString. See status in chapter 3 for more information. Wine implements several MCI mid level drivers (status is given for both built-in and native implementation):
TODO: (apply to all built-in MCI drivers)
use MMSYSTEM multitasking caps instead of the home grown
The currently best implementation is the MCI CDAUDIO driver that can be found in dlls/winmm/mcicda/mcicda.c. The implementation is mostly complete, there have been no reports of errors. It makes use of misc/cdrom.c Wine internal cdrom interface. This interface has been ported on Linux, FreeBSD and NetBSD. (Sun should be similar, but are not implemented.)
A very small example of a cdplayer consists just of the line mciSendString("play cdaudio",NULL,0,0);
TODO:
add support for other cdaudio drivers (Solaris...)
add support for multiple cdaudio devices (plus a decent configuration scheme)
The DLL is not cleanly separated from the NTDLL DLL. The CDROM interface should be exported someway (or stored in a Wine only DLL)
The implementation is rather complete and can be found in dlls/winmm/mciwave/audio.c. It uses the low level audio API (although not abstracted correctly).
FIXME:
The MCI_STATUS command is broken.
TODO:
check for correctness
better use of asynchronous playback from low level
better implement non waiting command (without the MCI_WAIT flag).
The implementation can be found in dlls/winmm/mciseq/mcimidi.c. Except from the Record command, should be close to completion (except for non blocking commands, as many MCI drivers).
TODO:
implement it correctly
finish asynchronous commands (especially for reading/record)
better implement non waiting command (without the MCI_WAIT flag).
implement the recording features