On Saturday 16 March 2002 13.59, Paul Davis wrote:
[...]
> the event-centered discussions we had here about MAIA. I'm not sure
> I like all the details of VST's method for handling this, but I do

Which parts don't you like?

The thing that disturbs me the most is the "extra" process call for 
passing the events, and the array used to hold pointers to the 
events. I can see why they added a new call (which is no excuse to do 
it in a new API), but the array... How would you go about allocating 
one if you need to send a bunch of events somewhere? Oh, right, you 
send events one by ony, using a function call...

This is how I prefer to do it, host and plugin sides alike:
---8<------------------------------------------------------------
static inline void audio_ev_write(audio_evport_t *evp,
                audio_event_t *ev)
{
        ev->next = NULL;
        if(!evp->first)
                evp->first = evp->last = ev;    /* Oops, empty port! */
        else
        {
                evp->last->next = ev;
                evp->last = ev;
        }
}
------------------------------------------------------------>8---
(BTW, this is not from MAIA, but from my current multimedia audio 
engine project - which actually seems to turn into a potential 
testbed for MAIA. I just added a simple event system, as the voice 
mixer code becoming too hairy. It actually seems to make things 
simpler overall, which not even I, "Mr. Event System", would have 
thought from the start... In short, it tends to eliminate redundant 
calculations by design.)


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`-------------------------------------> http://olofson.net -'

Reply via email to