[gmpi] Re: Topic 7: Audio packaging

  • From: Chris Grigg <gmpi-public@xxxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 28 May 2003 04:09:52 -0700

Steve said:

On Tue, May 27, 2003 at 12:51:52PM -0700, Chris Grigg wrote:
 >One thing that (I dont think) has been touched on is wether plugins should
 >be able to tell if some of its inputs are left unconnected, and wether the
 >plugin should get a buffer of 0.0's on that input, or NULL (or
 >requivalent).
 >
 >- Steve

Null buffer ptr would be the simplest, eh?

No, the simplest sound be that you still get passed a buffer of 0.0's, but you have a function call to tell if the port is connected or not.

That saves you writing the condition (and multiple inner loops) to detect
it if you dont care, I doubt this will be used for optimisation, its more
likly to be used for plugins that change thier behaviour depending on what
in/outputs are connected, eg.  reverbs that do differnt stuff when they
have 1 or 2 inputs of a stereo pair connected.

Needing a zero-buffer strikes me as a choice that only the plug author can correctly make, and conversely requiring all GMPI hosts to always furnish zero-buffers to all non-user-connected inputs seems like a possible source of system-wide inefficiency. Consider a utility mixer that scales N active inputs to avoid clipping; in that case, knowing that an input is semantically unconnected makes a difference in how the plug processes every other input, and unconnected inputs are not processed at all. So automatically furnishing zero-buffers isn't helpful in this case (unless there's a separate process-in-place reason to do it) and would result in unnecessary memory consumption, unless you assume sharing of a master zero-buffer (which wouldn't work for process-in-place buffers).


Seems as though you might want to make this a per-buffer property under plug control, called something like always-feed, so that the host can know whether or not there's a need to provide a zero-buffer when the user hasn't connected a source for that buffer.

-- Chris

----------------------------------------------------------------------
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: