On Monday 16 December 2002 03.16, Paul Davis wrote:
this is the
best suggestion so far. i love callbacks. note that
"meter" includes both tempo and time signature. you knew that,
though. i can't see anyone wanting to use TIME_TICKS.
--p
Callbacks do make sense here, I agree.
I disagree. Callbacks are not sample accurate.
i was assuming that the callback would be executed so that it was
passed the audio frame at which the change occurs.
Ah, I see. Well, that would work, but how fun is that when there are
multiple changes per block? Why not just use the event system, when
it's there anyway? Less overhead, and implementing the changes at the
right positions in the block becomes trivial.
Either way, the
only callback I see in that proposal is the host
one to "register" for these events... Did I miss something?
my definition of callback:
register_callback (function_to_be_called_when, when_to_call_it);
the name "callback" is based on a style of telephone interaction:
no callbacks:
Paul: hi David, is audiality is available?
David: its not.
with callbacks:
Paul: hi David, please call me back at +1 610-667-4807
when audiality is available.
[ ... time passes ... ]
[ ... david calls ... ]
David: its available.
or alternatively:
David: it will be available in 5 minutes.
Well, I need more than 5 minutes for the next release - but I get the
idea. :-)
Now, I'd just say that timestamped events are really rather similar.
They've got the advantages of the "it will be available in 5 minutes"
version (no need to split buffers - whatever that would mean in
telephony terms), but it's as easy to implement as the "its
available" variant, both for senders and receivers.
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`--------------------------->
http://olofson.net/audiality -'
---
http://olofson.net ---
http://www.reologica.se ---