[gmpi] Re: Topic 8: Parameters

  • From: Marc Poirier <fipnid@xxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Fri, 8 Aug 2003 08:52:24 -0700 (PDT)

--- Chris Grigg  wrote:
> Marc Poirer wrote:
> >--- Chris Grigg wrote:
> >>
> >>  I agree that there should definitely be length-delimited blob
> >>  parameters, for generality and to avoid unnecessary limits on plug
> >>  functionality.
> >>
> >>  Given that, why not make the first parameter (index 0) always be a
> >>  "state" blob?  If necessary it would encapsulate all the separate
> >>  parameters, plus whatever other blobby stuff the plug might need.
> >>  Then no need to provide separate mechanisms to handle parameters and
> >>  save/load of overall state.
> >>
> >>  Of course the individual parameters would also be available via
> their
> >>  own indexes too.
> >
> >Why impose this limitation?
> 
> Assuming you mean the parameter 0 convention, and not my final 
> paragraph, it's because of the reason I cited, i.e. to simplify the 
> API by avoiding the need for a separate state save/restore mechanism. 
> This achieves the same end by leveraging the parameter mechanism 
> instead.
> 
> 
> >And it's also imposing a requirement, too
> 
> But it's dead simple.  So yes, a requirement, but (per below) no real 
> burden.  Especially if the alternative is implementing a conventional 
> save/restore mechanism -- no net increase in work, in fact a 
> simplification.  Saves labor in another area.
> 
> 
> >(many plugins will not need an arb data parameter at all, but your idea
> >requires that they create one anyway).
> 
> OK, so a plug that doesn't want to support state save/load, if there 
> is such a thing, returns the host a blob size of 0 for parameter 0. 
> Done.
> 
> You don't see the simplification argument?


But you should be able to have as many of these as you want and need. 
Otherwise, the whole concept of arb data parameters is really no different
and no better than the one-blob-for-state idea.  That's why your idea is a
limitation.  It would also be simpler to just have 1 non-blob parameter
per plugin, too, but it certainly wouldn't be a good idea.  ;)  Anyway,
Mike Berry provided a good example of using more than 1 arb data parameter
in a plugin, and there are countless other examples...

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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