[gmpi] Re: Topic 7: Audio packaging, Process-In-Place

> buffer_a is initally the synth output, buffer_b is any junk.
> 
> /*           input     output */
> effect1->run(buffer_a, buffer_b);
> effect2->run(buffer_a, buffer_a);
> 
> No buffer copies, graph has been run, only requirement is that one of the
> effects is flagged as inplace safe.

I see that.  My version:

/*           input     output */
buffer_a->readonly = 1;
buffer_b = effect1->run(buffer_a);
buffer_a->readonly = 0;
buffer_c = effect2->run(buffer_a);

I guess with my version you can't be SURE the optimization is being made.
effect2 might not be safe.  And without knowing if a plugin is safe or not,
this case MIGHT fail to optimize.  And I admit to not liking the readonly
bits.

> Tim: I think the thing your missing is that the cache advantage of running
> inplace is not that great, the memcopy is just vastly more expensive.

A light bulb did go on today when I realized the ordering issue.  Is this
actually a common case?  It seems the ONLY time this can happen is when the
host does a Y split.  Plugins obviously would not have the same buffer for
two outputs (except a trash output for disconnected outs..).  So this case
can happen only when a host wants to clone a channel.

<last_grasp>
Is that really that common that it is the sole reason to shoot down
potential other wins?
</last_grasp>

Not many voices weighing in...

bed time for me

Tim

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