Microsoft DirectX 8.1 (C++) |
The IDirectMusicPort8 interface provides access to a DirectMusicPort object, which represents a device that sends or receives music data. The input port of an MPU-401, the output port of an MPU-401, the Microsoft software synthesizer, and an IHV-provided filter are all ports. A physical device such as an MPU-401 might provide multiple ports. A single port, however, cannot both capture and render data.
IDirectMusicPort8 is a define for IDirectMusicPort. The two interface names are interchangeable.
The interface is typically obtained by using the IDirectMusic8::CreatePort method.
For an overview, see Using DirectMusic Ports.
In addition to the methods inherited from IUnknown, the IDirectMusicPort8 interface exposes the following methods.
Method | Description |
PlayBuffer | Cues a buffer for playback by the port. |
Read | Fills a buffer with incoming MIDI data. |
SetReadNotificationHandle | Specifies an event that is to be set when MIDI messages are available to be read with the Read method. |
Method | Description |
Activate | Activates or deactivates the port. |
DeviceIoControl | Calls the Win32 DeviceIoControl function on the underlying file handle implementing the port. |
SetDirectSound | Overrides the default DirectSound object or buffer, or both, to which a port's wave data is streamed. |
Method | Description |
Compact | Instructs the port to compact |
DownloadInstrument | Downloads an instrument to the DLS device. |
UnloadInstrument | Unloads a previously downloaded DLS instrument. |
Method | Description |
GetCaps | Retrieves the port's capabilities. |
GetFormat | Retrieves information about the wave format specified in the DMUS_PORTPARAMS8 structure passed to IDirectMusic8::CreatePort, and the recommended size of the buffer to use for wave output. |
GetLatencyClock | Retrieves a pointer to the port's latency clock. |
GetRunningStats | Retrieves information about the state of the synthesizer. |
Method | Description |
GetChannelPriority | Retrieves the priority of a MIDI channel. |
GetNumChannelGroups | Retrieves the number of channel groups on the port. |
SetChannelPriority | Sets the priority of a MIDI channel. |
SetNumChannelGroups | Changes the number of channel groups that the application needs on the port. |
The LPDIRECTMUSICPORT8 type is defined as a pointer to the IDirectMusicPort8 interface.
typedef IDirectMusicPort8 *LPDIRECTMUSICPORT8;
Requirements
Header: Declared in dmusicc.h.