IDirectMusicPerformance::ReferenceToMusicTime

The IDirectMusicPerformance::ReferenceToMusicTime method converts time in REFERENCE_TIME format to time in MUSIC_TIME format.

HRESULT ReferenceToMusicTime(
  REFERENCE_TIME rtTime,
  MUSIC_TIME* pmtTime
);
 

Parameters

rtTime
The time in REFERENCE_TIME format.
pmtTime
Address of a variable to receive the converted time in MUSIC_TIME format.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method may return one of the following error values:

E_POINTER
DMUS_E_NO_MASTER_CLOCK

Remarks

If a master tempo has been set for the performance (see Setting and Retrieving Global Parameters), it is taken into account when converting to music time.

Because music time is less precise than reference time, rounding off will occur.

QuickInfo

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusici.h.

See Also

IDirectMusicPerformance::MusicToReferenceTime, Reference Time vs. Music Time