Muokkaa

Jaa


MIDI Miniport Driver

A MIDI miniport driver manages the hardware-dependent functions of simple MIDI devices that lack advanced capabilities such as hardware sequencing and downloadable sounds (DLS). The MIDI port driver handles the timing of the delivery of MIDI messages to synthesizers. The MIDI miniport driver is responsible only for transporting the MIDI messages to the synthesizer in response to requests from the port driver. Devices with advanced MIDI capabilities should use a DMus miniport driver instead.

A MIDI miniport driver should implement two interfaces:

  • The miniport interface initializes the miniport object and creates MIDI streams.

  • The stream interface manages a MIDI stream and exposes most of the miniport driver's functionality.

The miniport interface, IMiniportMidi, inherits the methods in the IMiniport interface. IMiniportMidi provides the following additional methods:

IMiniportMidi::Init

Initializes the miniport object.

IMiniportMidi::NewStream

Creates a new stream object.

IMiniportMidi::Service

Notifies the miniport driver of a request for service.

The stream interface, IMiniportMidiStream, inherits the methods in the IUnknown interface. IMiniportMidiStream provides the following additional methods:

IMiniportMidiStream::Read

Reads input data from a MIDI capture device.

IMiniportMidiStream::SetFormat

Sets the data format of the MIDI stream.

IMiniportMidiStream::SetState

Sets the state of the MIDI stream.

IMiniportMidiStream::Write

Writes output data to a MIDI synthesizer.

The MIDI port driver handles all timing issues in both directions and relies on the miniport driver to promptly move data on and off the adapter in response to the port driver's calls to the IMiniportMidiStream read and write methods.

PortCls contains built-in MIDI miniport drivers for MIDI devices that have FM synth and UART functions. For more information, see PcNewMiniport.