Microsoft DirectX 8.1 (Visual Basic) |
The ClockToMusicTime method converts clock time to music time.
object.ClockToMusicTime(ctTime As Long) As Long
Parts
object
Resolves to a DirectMusicPerformance8 object.
ctTime
Time to convert, in clock time units.
Return Values
Returns the equivalent music time.
Error Codes
If the method fails, it raises an error, and Err.Number can be set to DMUS_E_NO_MASTER_CLOCK.
Remarks
This method converts a time offset from the start of the performance, not a duration. The ratio between music time and clock time units depends on the tempo, so in making the conversion, DirectMusic takes into account all tempo changes since the start of the performance. If a master tempo has been set for the performance, it is taken into account as well.
Because music time is less precise than clock time, rounding off occurs.
See Also