[gmpi] Re: Topic 7: Audio packaging, Process-In-Place

> I think Tim's "baton passing" (I'd prefer "buffer passing") scheme seems 
> pretty good. I'd like it a bit better if it had read-only flags on the 
> input buffers that would force the plug to copy, well I think host writers 
> would prefer this.

An easy extension - the ramification is that plugins need to be aware of
that and test for it.

#define GIMME_BUFFER(buf,host)  (buf->readonly ? host->clone_buffer(buf):buf)

Still a conditional, but simple.

> Disadvantages are possible memory leak if plug forgets to free buffer (but 
> how hard is that?) and the requirement to be allocating during process (but 
> I think this is inevitable anyway).

Actually, you can catch this too.  The host knows all the buffers it
allocated on one graph-walk.  At the end of the walk, any unallocated
buffers are 'leaked'.  The host can report the offending plugin and recover
the memory.

Tim

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: