[gmpi] Re: Decision time: 7.2

  • From: Mike Berry <mberry@xxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Sat, 19 Jul 2003 16:00:21 -0600

Either will work. I like the idea of setting it to NULL, because then plugin writer must check before writing. If you just set it as the same as the input, then an inexperienced plugin write may not check but simply write into it and be confused as to why their input buffer is messed up. Take, for instance, this flawed code:

*output += *input;
*delay += *input;

This will work if the input and output buffers are discrete. If they are the same, then obviously the amplitude going into the delay line will be doubled, which may leave the programmer confused. If output is NULL, then you crash, leading to a rather more dramatic result.

But as I said, setting them the same will certainly work.

Steve Harris wrote:
On Fri, Jul 18, 2003 at 06:26:31PM -0600, Mike Berry wrote:

e.) A plugin is passed input and output buffers. The output buffers may be NULL, indicating that the corresponding input buffer should be processed in place. Hosts must not pass NULL output buffers if the plugin is assymetrical in its inputs and outputs. Hosts must not mix NULL and non-NULL output buffers in a single call.
Therefore, all symmetrical plugins must support in place and copy to processing. All assymetrical plugins only support copy-to processing. All buffer management is handled by the host.


That sounds harder to handle than just setting the pointers to the same
address.

- Steve

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




--
Mike Berry
Adobe Systems


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