task_data


A task_data is an object which contains information about a task to be scheduled. Note that creating a task_data does not schedule it; you have to use the scheduler to do that.

class task_data {
public:
  task_data( my_wake_funcp f, void *a, long t );
  task_data( const MIDI_msg&  m, long t );
  task_data( const MIDI_msg& on, long dur, long t );
};
task_data( my_wake_funcp f, void *a, long t )
A task can be a function f with void* argument a scheduled for time t. Rogus has ZOR(TM) (Zero Overhead Rescheduling) for functions. This means that you can reschedule a function very quickly by having it return the number of half-milliseconds until its next invocation. If you don't want to reschedule the function, just return the Rogus constant NEVER.
task_data( const MIDI_msg& m, long t )
A task can be a MIDI_msg m scheduled for time t.
task_data( const MIDI_msg& on, long dur, long t )
A task can be a note on/note off pair with note on on and duration dur scheduled for time t. The note off will be generated by Rogus, just as it does for playnote().

Modified 28 March 1996 pepellet@mit.edu