Previous Topic Index Next Topic
[API function]

FMUSIC_GetTime

Returns the time in milliseconds since the song was started. This is useful for
synchronizing purposes becuase it will be exactly the same every time, and it is
reliably retriggered upon starting the song. Trying to synchronize using other
windows timers can lead to varying results, and inexact performance. This fixes that
problem by actually using the number of samples sent to the soundcard as a reference.

int F_API FMUSIC_GetTime(
FMUSIC_MODULE *mod
);

Parameters

mod Pointer to the song to get time from.

Return Value

On success, the time played in milliseconds is returned.
On failure, -1 is returned.

Remarks

This value is latency adjusted by default, and returns the number you are hearing, not the 'mix-time' value.
Use FSOUND_INIT_DONTLATENCYADJUST if you want the value at mix time, which is useful if you want to control the music interactively, or from a DSP callback.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube


This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:26 2005 by SourceDoc v0.10, the automated source code documenter.