IDirectMusic8 Interface
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 |
CreateMusicBuffer | Creates an object to hold messages being sequenced to the port. |
SetDirectSound | Connects DirectMusic to a DirectSound device object for output from the synthesizer. |
The LPDIRECTMUSIC8 type is defined as a pointer to the IDirectMusic8 interface:
typedef IDirectMusic8 *LPDIRECTMUSIC8;
Requirements
** Header:** Dmusicc.h
Library: Dmusic.dll, Dmusicd.dll
See Also