[gmpi] Re: Decision Time: 7.1.2

  • From: "Jeff McClintock" <jeffmcc@xxxxxxxxxx>
  • To: <gmpi@xxxxxxxxxxxxx>
  • Date: Sat, 14 Jun 2003 10:39:54 +1200

There's much debate about multiple sample datatypes in GMPI.

It's really not a big deal.

Just to illustrate, here's some code from the SynthEdit SDK, where a plugin
describes it's pins.......

bool Module::getPinProperties (long index, SEPinProperties* properties)
{
  switch( index )
  {
    case 0:
      properties->name = "Signal In";
      properties->variable_address = &input1_buffer;
      properties->direction = DR_IN;
      properties->datatype = DT_FLOAT;
      break;
case 1:
      properties->name = "Signal Out";
      properties->variable_address = &output2_buffer;
      properties->direction = DR_OUT;
      properties->datatype = DT_DOUBLE;
      break;

default:
      return false; // host will ask for plugs 0,1,2,3 etc. return false to
signal when done
};

return true;
}

Hopefully the above code makes some sense...

That's it... pretty easy, no?

I'm not saying use my code, I'm just saying: Supporting per-pin datatypes is
very easy. Not a huge code monster...

"The host must be real complicated?", I hear you ask....not really, it
hardly cares what datatypes are passed between plugins, the host only needs
to know the storage size of each datatype, to allocate the buffers.

In Synthedit's case, the host don't try to convert datatypes automatically.
If two pin's datatypes match, you can connect them, else you can't. Again,
not over-complicated, works in practice.
  Your host may handle conversions automatically, no skin off my nose :-).

Hope this helps,

Jeff M




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