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)

CDAUDIO

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

Native

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

MCIWAVE

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

Native

Native MCIWAVE works also correctly.

MCISEQ (MIDI sequencer)

Built-in

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

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

MCIANIM

Built-in

The implementation is in dlls/winmm/mcianim/.

TODO:

  • implement it, probably using xanim or something similar.

Native

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

MCIAVI

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 synchronisation issue

Native

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