[gmpi] Re: Decision Time: 7.3 (was 7.4, but 7.3 was too detailed)

  • From: Tim Hockin <thockin@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Tue, 5 Aug 2003 11:11:07 -0700 (PDT)

> If the plugins are going to be continuously called even if there is no
> processing to be done (which would waste CPU time), I'd say A, as this would
> allow the plugins to return immediately without having to process anything
> (or do some minimal processing.)

> A better idea would probably be to do B, but implement some way of letting
> the plugin say if it needs to do additional processing, and make the host
> stop calling each plugin when the plugin no longer wants to do more
> processing *and* when there is no signal being fed to it. When the plugin
> wants to do more processing, the input can just be emptied.

This seems FAR more complicated than just short-circuiting if your input is
silent.  The back and forth communication adds a lot of complexity to what
is otherwise a pretty simple standard case:

        if (inputs_are_silent && no_work_to_do)
                return;

> A better solution might be for plugins to rely on some parameter telling it
> how many samples are waiting to be processed. If the parameter is 0, we know
> that the buffer is empty. This would also mean you'd need a separate value
> for the output sample count, but these could be tied-in to the in and out
> buffers, if possible. So you could just scan the input buffers'
> "samplecount" parameter and process those pins that actually have something
> connected with a signal going through.
> 
> And, likewise, the plugin can then zero the sample count for output buffers,
> so the host knows to ignore those buffers.

A zero sample count is the same as flagging it as silent, except that it
forces all plugins to be silence-aware.  As for not calling process() on
some plugins, only symmetric plugins can be handled this way.  If I take
three inputs (stereo + side chain?) and have two outputs (stereo) how does
the host know what to do?  Further, if plugins can generate events, you need
to periodically call them -> process().



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