[gmpi] Re: Topic 7: Audio packaging

  • From: Tim Hockin <thockin@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 21 May 2003 13:47:37 -0700 (PDT)

> one buffer per audio channel. And since any pin may have N 

I hate the notion of 'pins' having multiple channels.  I prefer to think of
it as one audio-channel per wire.  Think of a typical setup with a bunch of
mono patch cables - one channel == one patch cable.

> But we also need metadata about what multi-channel audio format is 
> being represented (mono, stereo, LtRt, M-S, quad, 5.1, 7.1, etc.), 
> with corresponding channel order/number conventions, so that the plug 
> can know what to do with each channel buffer.  I.e. there needs to be 
> an enum or other shorthand tag for representing the 

For XAp we did this:  The plugin hints each channel with common hints (LEFT,
RIGHT, MONO, LFE, etc).  The host can then automatically connect a LEFT
output to a LEFT input.  If there is confusion, the host might need to ask
the user.  This gives us an infinitely flexible way to handle multi-channel
audio.  We don't need to code 5.1, 6.1, 7.1, etc into the spec except as
hints.

Each audio channel may have multiple hints, too.  For example, a plug that
can do 5.1 or stereo or mono:

1: MONO, LEFT, FRONT-LEFT
2: RIGHT, FRONT-RIGHT
3: CENTER
4: REAR-LEFT
5: REAR-RIGHT
6: LFE

The host then has enough info to do lots of smart things, including showing
the user the localized (based on hint) names.

As for in-place vs not, we can simplify everything by making the API
in-place safe, and forcing plugs that are not safe to use an internal
temporary buffer (allocated by the host).  However, with multi-channel
audio, it does get complicated to know which input corresponds to which
output.  Perhaps it is simpler to just say that there is never in-place
processing.

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

Other related posts: