int32 InitJuggler( void )
If successful, InitJugger()
returns 0. If unsuccessful, it returns an error code (a negative value).
Note that a task must call InitJuggler()
before it can use any Juggler calls or play Juggler objects (including MIDI scores created as described in Playing MIDI Scores).
COBObject *CreateObject( COBClass *Class )
*Class
, a pointer to the COBClass
data structure containing the class definition. There are currently two classes defined in the header file juggler.h. The classes are SequenceClass
and CollectionClass
, which you can supply to this call as the pointers &SequenceClass
and &CollectionClass
.
When it executes, CreateObject()
allocates memory for the object, sets up object variables and method pointers in that memory, and initializes the object variables to default values.
CreateObject()
returns a pointer to the COBObject
data structure defining the object if successful or a negative value (an error code) if unsuccessful. The task uses the pointer to the COBObject
structure when sending messages to the object or when using other object management calls on the object.
int32 DestroyObject( COBObject *Object )
*Object
, a pointer to the object to be destroyed. When executed, the call terminates any methods the object may be executing and frees the memory used to contain the object's COBObject
data structure.
DestroyObject()
returns 0 if successful, or a negative value (an error code) if unsuccessful.
int32 ValidateObject( COBObject *cob )
*cob
, a pointer to an object's COBObject
data structure. When the call executes, it looks in the object's data structure for an element that confirms the object's validity.
If the object is valid, ValidateObject()
returns 0. Otherwise, the call returns a negative value (an error code).