309 |
class VMEventHandler; |
class VMEventHandler; |
310 |
class VMExecContext; |
class VMExecContext; |
311 |
|
|
312 |
|
/** |
313 |
|
* Maximum amount of child script handler instances one script handler is |
314 |
|
* allowed to create by calling built-in script function fork(). |
315 |
|
*/ |
316 |
|
#define MAX_FORK_PER_SCRIPT_HANDLER 8 |
317 |
|
|
318 |
/** @brief Real-time instrument script event. |
/** @brief Real-time instrument script event. |
319 |
* |
* |
320 |
* Encapsulates one execution instance of a real-time instrument script for |
* Encapsulates one execution instance of a real-time instrument script for |
338 |
int executionSlices; ///< Amount of times this script event has been executed by the ScriptVM runner class. |
int executionSlices; ///< Amount of times this script event has been executed by the ScriptVM runner class. |
339 |
bool ignoreAllWaitCalls; ///< If true: calling any built-in wait*() script function should be ignored (this variable may be set with the 2nd argument of built-in script function stop_wait()). |
bool ignoreAllWaitCalls; ///< If true: calling any built-in wait*() script function should be ignored (this variable may be set with the 2nd argument of built-in script function stop_wait()). |
340 |
VMEventHandlerType_t handlerType; ///< Native representation of built-in script variable $NI_CALLBACK_TYPE, reflecting the script event type of this script event. |
VMEventHandlerType_t handlerType; ///< Native representation of built-in script variable $NI_CALLBACK_TYPE, reflecting the script event type of this script event. |
341 |
|
script_callback_id_t parentHandlerID; ///< Only in case this script handler instance was created by calling built-in script function fork(): callback ID of the parent event handler instance which created this child. For regular event handler instances which were not created by fork(), this variable reflects 0 (which is always considered an invalid handler ID). |
342 |
|
script_callback_id_t childHandlerID[MAX_FORK_PER_SCRIPT_HANDLER+1]; ///< In case built-in script function fork() was called by this script handler instance: A zero terminated ID list of all child event handler instances (note: children will not vanish from this list after they terminated). |
343 |
|
bool autoAbortByParent; ///< Only if this is a child event handler created by calling fork(): if this is true then this child will automatically aborted if the parent event handler terminates. |
344 |
|
int forkIndex; ///< Only for fork() calls: distinguishment feature which is 0 for parent, 1 for 1st child, 2 for 2nd child, etc. |
345 |
|
|
346 |
|
void forkTo(ScriptEvent* e, bool bAutoAbort) const; |
347 |
|
int countChildHandlers() const; |
348 |
|
void addChildHandlerID(script_callback_id_t childID); |
349 |
}; |
}; |
350 |
|
|
351 |
/** |
/** |
357 |
* interpreted by this method to be "now". |
* interpreted by this method to be "now". |
358 |
* |
* |
359 |
* The meaning of @a fragmentPosBase becomes more important the larger |
* The meaning of @a fragmentPosBase becomes more important the larger |
360 |
* the audio fragment size, and vice versa it bcomes less important the |
* the audio fragment size, and vice versa it becomes less important the |
361 |
* smaller the audio fragment size. |
* smaller the audio fragment size. |
362 |
* |
* |
363 |
* @param queue - destination scheduler queue |
* @param queue - destination scheduler queue |