ISynthSinkDMus::RefTimeToSample method (dmusicks.h)

The RefTimeToSample method converts a reference time into a sample time.

Syntax

NTSTATUS RefTimeToSample(
  [in]  REFERENCE_TIME rfTime,
  [out] LONGLONG       *pllSampleTime
);

Parameters

[in] rfTime

Pointer to the reference time being passed in. The reference time is measured in 100-nanosecond units.

[out] pllSampleTime

Output pointer for the sample time. This parameter points to a caller-allocated variable into which the method writes the calculated sample time.

Return value

RefTimeToSample returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.

Remarks

The RefTimeToSample method converts reference time to sample time. The method takes a reference time as an input parameter, and it outputs the corresponding sample time.

The calculation of the reference time from the sample time depends on the sampling frequency. For example, if the output buffer is in a 44.1 kHz format, a sample time of 44,100 is equivalent to a reference time of one second.

Requirements

Requirement Value
Target Platform Desktop
Header dmusicks.h (include Dmusicks.h)

See also

IDirectMusicSynthSink::RefTimeToSample

ISynthSinkDMus