Previous Topic Index Next Topic
[API function]

FMUSIC_SetZxxCallback

Sets a user callback for any Zxx commands encountered in an S3M, XM or IT file.

signed char F_API FMUSIC_SetZxxCallback(
FMUSIC_MODULE *mod,
FMUSIC_CALLBACK callback
);

Parameters

mod The module or song to set the callback for.
callback The callback function you supply to get called upon execution of a Zxx command.

Return Value

On success, TRUE is returned.
On failure, FALSE is returned.

Remarks

The value passed into the param parameter of the callback is the xx value specified in the Zxx
command by the musician.
------------
It is important to note that this callback will be called from directly WITHIN the
mixer / music update thread, therefore it is imperative that whatever you do from this
callback be extremely efficient. If the routine takes too long then breakups in the sound
will occur, or it will basically stop mixing until you return from the function.
This sort of function is usually best for just setting a flag, or do some simple variable
manipulation, and then exiting, letting your main thread do what it needs to based on these
flags or variables.
------------
This callback is LATENCY adjusted by default, so that the callback happens when you HEAR the sound, not when it is mixed, for accurate synchronization.
Use FSOUND_INIT_DONTLATENCYADJUST if you want it to be called back at mix time, which is useful if you want to control the music interactively.
------------
Note : This function is not supported with the MIDI format.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

See Also

FMUSIC_CALLBACK , FMUSIC_SetInstCallback , FMUSIC_SetOrderCallback , FMUSIC_SetRowCallback

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.