|
resonance 1.0.1
|
Scheduling of timed commands. More...
Classes | |
| class | Playbacker |
| Replay of a recorded command stream that Sch::Scheduler::StartPlayback() installs. More... | |
| class | Recorder |
| Recording of every command the scheduler queues, installed by Sch::Scheduler::BeginRecording(). More... | |
| class | Scheduler |
| Scheduler that runs queued commands when their due time arrives. More... | |
| class | SystemTime |
| Clock the scheduler reads its due times from, in nanoseconds. More... | |
| class | TimeClock |
| Time base a scheduler measures its due times against, and the base class of Sch::TickClock. More... | |
| class | Tick |
| Song position in MIDI ticks, printed as measure, beat, and tick. More... | |
| class | CmdID |
| Handle that identifies one batch of commands the scheduler has queued. More... | |
| class | Command |
| Base of every action the scheduler performs on behalf of another subsystem. More... | |
| class | CommandFactory |
| Registrar that adds one command class to the factory list Command::NewCommand() searches. More... | |
| class | TempoMap |
| Affine map between a song position in MIDI ticks and scheduler time in nanoseconds. More... | |
| class | TickClock |
| Pausable view of scheduler time, together with the tempo that maps it to a song position. More... | |
| class | Time |
| Scheduler time, as a signed 64-bit count. More... | |
| class | TimedCommand |
| One queued command, together with the time the scheduler is to run it at. More... | |
Typedefs | |
| typedef Command *(* | CommandFactoryProc) () |
| Produces one command of a registered class. | |
Functions | |
| OBStream & | operator<< (OBStream &stream, Command *pCommand) |
| Write a command through the stream, preceded by a presence byte. | |
| IBStream & | operator>> (IBStream &stream, Command *&pCommand) |
| Read a command back through the stream and construct it from the factory list. | |
| OBStream & | operator<< (OBStream &stream, Command &command) |
| Write a command that is known to exist through the stream, preceded by a presence byte. | |
| IBStream & | operator>> (IBStream &stream, Command &command) |
| Read a command's payload back into an existing command. | |
Scheduling of timed commands.
The scheduler, its clocks, the recorder and play-back of command streams, and the time and song-position types they use.
| typedef Command *(* Sch::CommandFactoryProc) () |
Produces one command of a registered class.
Write a command through the stream, preceded by a presence byte.
A null command produces the single byte 0. A command whose CmdID() is zero is reported through Print() and Fatal(). Any other command produces the byte 1, then its identifier as four bytes, then its own payload.
| stream | The stream to write to. |
| pCommand | The command to write, or null. |
Read a command back through the stream and construct it from the factory list.
The presence byte 0, and an end of data before it arrives, both produce a null result. Any byte other than 0 or 1 is reported through Fatal().
| stream | The stream to read from. |
| pCommand | Receives the new command, or null. |
Write a command that is known to exist through the stream, preceded by a presence byte.
The same layout as the pointer overload. A command whose CmdID() is zero produces the single byte 0 here rather than a fatal report. The shipped program does not call it.
| stream | The stream to write to. |
| command | The command to write. |
Read a command's payload back into an existing command.
The presence byte and the identifier are read together. A presence byte other than 1 and an identifier other than the command's own CmdID() are each reported through Fatal(). The shipped program does not call it.
| stream | The stream to read from. |
| command | The command to fill. |