DSpContext_SetVBLProc
You can use theDSpContext_SetVBLProcfunction 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
inProcPtrcallback.- 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 theinContextparameter and a pointer to the VBL task callback function in theinProcPtrparameter. The callback pointer must be of this type:
The reference constant passed in thetypedef Boolean (*DSpCallbackProcPtr)(DSpContextReference inContext, void *inRefCon);inrefConparameter will be handed back by DrawSprocket when it calls the callback procedure. The return value from theinProcPtrparameter is ignored by DrawSprocket. See theMyCallbackFunctionfunction (page 2-75) for a description of the callback.