Microsoft DirectX 8.1 (Visual Basic)

DirectMusicPerformance8.GetTempo

The GetTempo method retrieves the tempo at a given time.

object.GetTempo( _
  mtTime As Long, _
  mtUntil As Long _
) As Double

Parts

object

Resolves to a DirectMusicPerformance8 object.

mtTime

Time for which to retrieve the tempo, in music time. The last tempo change before or at this time is used to determine the tempo.

mtUntil

Variable of type Long that receives the music time (relative to mtTime) until which the tempo is valid. If this returns a value of 0, either the tempo is always valid, or it is unknown when it might become invalid.

Return Values

Returns the tempo, in beats per minute. This value is in the range from DMUS_TEMPO_MIN through DMUS_TEMPO_MAX (see CONST_DMUS).

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DMUS_E_NO_MASTER_CLOCK
DMUS_E_GET_UNSUPPORTED
DMUS_E_NOT_FOUND
DMUS_E_TRACK_NOT_FOUND