[API function]
Sets a user callback to occur every time a instrument is played, triggered from a MOD, S3M, XM or IT file.
signed char F_API FMUSIC_SetInstCallback(
FMUSIC_MODULE *mod,
FMUSIC_CALLBACK callback,
int instrument
);
Parameters
mod |
The module or song to set the callback for.
|
callback |
The callback function you supply to get called.
|
instrument |
Call the callback when this instrument number is triggered.
|
Return Value
On success, TRUE is returned.
On failure, FALSE is returned.
Remarks
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, so that the callback happens when you HEAR the sound,
not when it is mixed, for accurate synchronization.
------------
Note : This function is not supported with the MIDI format.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox
See Also
FMUSIC_CALLBACK
,
FMUSIC_SetOrderCallback
,
FMUSIC_SetRowCallback
,
FMUSIC_SetZxxCallback
This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Fri Dec 20 16:31:08 2002
by SourceDoc v0.10, the automated source code documenter.