[gmpi] Re: Topic 7: Audio packaging

On Wed, May 28, 2003 at 06:13:19 -0700, Chris Grigg wrote:
 >Er, there only needs to be one buffer of 0.0's per host, its never written
 >to.

 Not true if connected to a process-in-place input, was my point.
 Each one of those always needs its own copy because by definition it
 will overwrite the input buffer with output, and then there go all
 the 0.0's.

The host is not mandated to use inplace processing, it just has the option to, if the plugin indicates it is compatible. If it wants the output to go to a particular buffer (to save copying) it just sets the output as normal and sets the input to be global_zero_buffer.

If the plugin indicated it /can/ run inplace it doesn't matter to it
wether it is or not, it shouldn't assume it will be.

Ah, right you are, thanks for clarifying. Restated: When confronted with an unconnected plug input buffer line that needs to be fed a zero-stream, a host that supports process-in-place has to decide whether to a) use the single-zero-buffer approach and not have the plug process-in-place for that buffer, or else B) furnish an overwritable copy of the zero-buffer and have the plug process-in-place for that buffer.



Equally if it has
inputs A and B and outputs C and D it shouldn't assume that A will become C
and B will become D, the host may have perfectly good reasons for crossing
them.

Hm, is this part really always true? Consider inputs A', B', C' and outputs D' and E', where A' and B' are control signals affecting the processing of audio input C', with time-smoothing constants, D' is the audio out, and E' is a control signal out based on an analysis of A' and B'. So because of the time constants you want to do a full pass on A' and B' before doing the audio processing pass on C'. In this case the host couldn't use the C' buffer for D' as that would erase the audio input before the plug got around to processing it.


So I still think what I said before, that the plug is the only entity in a position to know which logical output buffer(s), if any, can safely be used as the physical 'process-in-place' buffer for each logical input buffer. We could decide to furnish a mechanism for the plug to tell the host that, but a priori the host just doesn't know enough about how the plug was written to allow such 'crossing' decisions... unless we add an unpleasant rule like 'all plugs can only take one pass at their I & O buffers'.

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

Other related posts: