The IDirectMusic::SetMasterClock method sets the DirectMusic master clock to a clock identified by a GUID obtained through the IDirectMusic::EnumMasterClock call. There is only one master clock for all DirectMusic applications.
HRESULT SetMasterClock(
REFGUID rguidClock
);
If the method succeeds, the return value is S_OK.
If it fails, the method may return DMUS_E_PORTS_OPEN.
If another running application is also using DirectMusic, it is not possible to change the master clock until that application is shut down.
Most applications will not need to call SetMasterClock. It should not be called unless there is a need to synchronize tightly with a hardware timer other than the system clock.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusicc.h.