[gmpi] Re: Topic 7: Audio packaging

  • From: Tim Hockin <thockin@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Fri, 23 May 2003 21:23:45 -0700 (PDT)

> example 1)
> 
> [Synth]--->[Effect1]----->
>           \------->[Effect2]------>
> 
>  My host passes same input buffer to two plugins. If one plugin
> processes-in-place, it will over-write the other's input buffer.
>    (To protect againt this, my host would duplicate the input buffer).

Yes. I would draw that diagram with a splitter plugin at the Y junction.  I
like the idea that every operation on a stream is a plugin.

> example 2)
> 
> ---->[Mono to Stereo]-------->[Effect1]----->
>                                   \---------[Effect2]------>
> 
>  A mono-stereo plugin pointer-swaps one input to it's two outputs, feeding
> two downstream plugins.  Again, my host would need to duplicate the output
> buffers to protect against over-write.

This just agrees with my belief that there should not be two users of a
buffer at the same time.  It doesn't obviate the usefulness of pointer
swapping or in-place processing.

> So,  both techniques, designed to save memory copying, don't. (In my case).

I think there are plenty of applications that CAN save memory bandwidth can
- they just aren't this simple ;)

> I'm uneasy about plugins passing around raw pointers to buffers. I'm sure
> none of you gentlemen ever cause memory leaks, but... you know...... newbies
> ;-)

Yeah, well, there is that whole notion.  We can make a ton of technical
solutions to the leakage problem.  If a plugin wants to hold a buffer for 
more than the current process() slice, it must call some host callback, or
else the buffer will be re-used, or some semantic that forces people to add
the host->release_buffer(b); call.   It's not a hard problem to solve, nor
is it particularly complex.

There may be other clever ways to make savings and not baffle newbies.


----------------------------------------------------------------------
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: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: