                              Wine Documentation                               
Prev                    Chapter 13. Wine and Multimedia                    Next
-------------------------------------------------------------------------------

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

  * use MMSYSTEM multitasking caps instead of the home grown
   
13.3.1. CDAUDIO

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

13.3.2. MCIWAVE

13.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).
   
13.3.2.2. Native

Native MCIWAVE works also correctly.

13.3.3. MCISEQ (MIDI sequencer)

13.3.3.1. 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
   
13.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
   
13.3.4. MCIANIM

13.3.4.1. Built-in

The implementation is in dlls/winmm/mcianim/.

TODO:

  * implement it, probably using xanim or something similar.
   
13.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).

13.3.5. MCIAVI

13.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 synchronisation issue
   
13.3.5.2. Native

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

-------------------------------------------------------------------------------
Prev                                 Home                                  Next
Low level layers                      Up                      High level layers
