[gmpi] Re: Topic 3: Cross platform

  • From: David Olofson <david@xxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Thu, 6 Mar 2003 00:34:51 +0100

On Wednesday 05 March 2003 20.04, Angus F. Hewlett wrote:
[...]
> > Scenario 2:  Suppose somebody writes a plugin that fiendishly
> > allocates memory during streaming, off a multithreaded heap. 
> > Users wonder why multiple instances of this plugin perform so
> > badly in a heavily multithreaded host.  We could expose a host
> > allocator that prohibits allocations during live streaming.
>
> But then unless you MANDATE the host memory-allocation callback,
> the developer will just go away and do it the "bad" way anyway :(

This is where "support for soft real time operations in hard real time 
systems" come in. Basically, we have to provide ways for plugins to 
do "risky" stuff without blocking the host real time thread.

The alternative is to simply mark plugins that need to do these things 
as incompatible with real time processing, and IMNSHO, that's 
completely useless.

<technical>
One idea considered for XAP is "worker callbacks"; a very simple 
threading API meant for (re)allocating buffers, doing massive 
calculations, off-line rendering, loading from disk and other stuff 
that either takes too much time, or is nondeterministic. It's not 
"real" threading, as there are only two sync points for a worker 
callback: the host call to start it (host calls a function in another 
thread) and the event that tells the plugin that the worker callback 
has returned.
</technical>


//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---


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