Microsoft DirectX 8.1 (C++)

IDirectMusic8

The IDirectMusic8 interface provides methods for managing buffers, ports, and the master clock. There should not be more than one instance of this interface per application.

IDirectMusic8 supersedes IDirectMusic and adds a new method, SetExternalMasterClock.

There is no helper function to create this interface. Applications use the COM CoCreateInstance function, the IDirectMusicPerformance8::Init method, or the IDirectMusicPerformance8::InitAudio method to create a DirectMusic object.

In addition to the methods inherited from IUnknown, the IDirectMusic8 interface exposes the following methods.

Ports

Method Description
Activate Activates or deactivates all ports created from this interface.
CreatePort Creates an object for a DirectMusic port.
EnumPort Enumerates and retrieves the capabilities of the DirectMusic ports connected to the system.
GetDefaultPort Retrieves the GUID of the default output port.

Timing

Method Description
EnumMasterClock Enumerates the clocks that DirectMusic can use as the master clock.
GetMasterClock Retrieves the GUID and a pointer to the interface for the current master clock.
SetExternalMasterClock Sets the DirectMusic master clock to an existing clock object.
SetMasterClock Sets the DirectMusic master clock to a clock identified by a call to EnumMasterClock.

Miscellaneous

Method Description
SetDirectSound Connects DirectMusic to a DirectSound object for output from the synthesizer.
CreateMusicBuffer Creates a DirectMusicBuffer object to hold music messages being sequenced to the port.

The LPDIRECTMUSIC8 type is defined as a pointer to the IDirectMusic8 interface.

typedef IDirectMusic8 *LPDIRECTMUSIC8;

Requirements

  Header: Declared in dmusicc.h.