On Monday 09 December 2002 14.49, Steve Harris wrote: > On Mon, Dec 09, 2002 at 11:39:38AM +0100, David Olofson wrote: > > In theory, the problem is very easy to solve: Have the host throw > > in "shadow event ports", and then have it sort/merge the queues > > from those into a single, ordered queue that is passed to the > > actual target port. > > I dont think this totally solves the problem. > > There is also the latency problem, if the instrument generates > output events with the same timestamp as some input event > (reasonable) then it wont receive those same event until its next > processing block, what does it do then? They are all arriving > "late".
That's the feedback loop problem. As long as the host runs plugins in the correct order, you'll never see this unless you *actually* have loops in your network. > Should the host add latency to the events (by adding one blocks > worth to the event time)? In an actual loop, yes, it would have to do that - at least the way timestamps work in Audiality. (Running time, wrapping, not related to buffer boundaries.) The way VST does it however, that wouldn't be needed, since timestamps are related to buffers. 0 == start of this buffer. Might look nice to plugins, but I forsee minor nightmares in multithreaded hosts, hosts that want to split buffers, hosts that support different buffer sizes in parts of the net, hosts that support multiple sample rates in the system, communication over wire,... (Yet another reason why I think the VST event system is a pretty bad design.) > Of course this is only a problem when you have graphs with > feedback, otherwise there is a linear execution order that ensures > this kind of problem wont happen. Exactly. BTW, feedback loops would be the major reason why a host would want to run parts of the net with smaller buffers. See why I discarded the idea of buffer related timestamps? :-) //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 -' .- M A I A -------------------------------------------------. | The Multimedia Application Integration Architecture | `----------------------------> http://www.linuxdj.com/maia -' --- http://olofson.net --- http://www.reologica.se ---