12.3. Mid level drivers (MCI)

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)

12.3.1. CDAUDIO

12.3.1.1. Built-in

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 dlls/ntdll/cdrom.c Wine 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)

12.3.1.2. Native

Native MCICDA works also correctly... It uses the MSCDEX traps (on int 2f). However, some commands (like seeking) seem to be broken.

12.3.2. MCIWAVE

12.3.2.1. Built-in

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).

12.3.2.2. Native

Native MCIWAVE works also correctly.

12.3.3. MCISEQ (MIDI sequencer)

12.3.3.1. Built-in

The implementation can be found in dlls/winmm/mciseq/mcimidi.c. Except for 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

12.3.3.2. Native

Native MCIMIDI has been working but is currently blocked by scheduling issues (mmTaskXXX no longer work).

FIXME:

  • midiStreamPlay get from time to time an incorrect MidiHdr when using the native MCI sequencer

12.3.4. MCIANIM

12.3.4.1. Built-in

The implementation is in dlls/winmm/mcianim/.

TODO:

  • implement it, probably using xanim or something similar.

12.3.4.2. Native

Native MCIANIM is reported to work (but requires native video DLLs also, even though the built-in video DLLs start to work correctly).

12.3.5. MCIAVI

12.3.5.1. Built-in

The implementation is in dlls/winmm/mcianim/. Basic features are present, simple playing is available, even if lots remain to be done. It rather heavily relies on MSVIDEO/MSVFW32 DLLs pair to work.

TODO:

  • finish the implementation

  • fix the audio/video synchronization issue

12.3.5.2. Native

Native MCIAVI is reported to work (but requires native video DLLs also). Some files exhibit some deadlock issues anyway.