DSpContext_SetVBLProc
You can use theDSpContext_SetVBLProc
function to piggyback your own VBL task to a particular context.
OSStatus DSpContext_SetVBLProc ( DSpContextReference inContext, DSpCallbackProcPtr inProcPtr, void *inRefCon);
inContext
- The context the VBL task is associated with.
inProcPtr
- A pointer to an application-supplied callback function.
inRefCon
- An reference constant to be handed back by DrawSprocket when it calls the
inProcPtr
callback.- function result
- A result code.
DESCRIPTION
Because DrawSprocket needs to set up VBL tasks of its own, you can piggyback your own VBL task to a particular context easily with this function, instead of digging down through the system to find the correct slot ID and installing your own. Pass the function the context in theinContext
parameter and a pointer to the VBL task callback function in theinProcPtr
parameter. The callback pointer must be of this type:
The reference constant passed in thetypedef Boolean (*DSpCallbackProcPtr)(DSpContextReference inContext, void *inRefCon);
inrefCon
parameter will be handed back by DrawSprocket when it calls the callback procedure. The return value from theinProcPtr
parameter is ignored by DrawSprocket. See theMyCallbackFunction
function (page 2-75) for a description of the callback.