IXACTSoundBank::Prepare

Prepares a cue instance for playback.

HRESULT Prepare(
  XACTINDEX nCueIndex,
  DWORD dwFlags,
  XACTTIME timeOffset,
  IXACTCue **ppCue
);

Parameters

nCueIndex
[in] Value indicating the index of the cue to be primed.
dwFlags
[in] Unused and should be 0.
timeOffset
[in] Offset from the beginning of the sound in ms to start play from.
ppCue
[out] Pointer to an IXACTCue object returned.

Return Values

Returns S_OK if successful, an error code otherwise.

Remarks

This method returns a valid cue instance, ready to be played. All allocations and, if necessary, stream priming are done by this method.

IXACTSoundBank::Prepare is called internally by IXACTSoundBank::Play, it is only necessary to call IXACTSoundBank::Prepare directly if you want to ensure that the sound starts the moment you call IXACTSoundBank::Play.

Requirements

Header: Declared in Xact.h.

See Also

IXACTSoundBank