[gmpi] Re: Topic 7: Audio packaging

Title: [gmpi] Re: Topic 7: Audio packaging
David wrote:
Tim wrote:
> ...The buffers would still be mono (assuming non-interleaved, which I
> think is pretty well decided).  But a connection would have N
> buffers together.  Your stereo connection would have two channels
> and 5.1 would have 6.  The enumerated format just tells the host
> some semantics about those channels.

Ah, so it's *only* about connection negotiation?

I hope we're not talking about actual structures at the "DSP level".
Pins/ports or whatever we call them should always be mono, IMO.

I think the 'pin' and 'port' terminology is obfuscating our communication... unsurprisingly, since we haven't yet defined those terms   ;-).  Inside, a multichannel connection point/port/pin is in all cases (here I presume there is final agreement on non-interleaving:) a bundle of mono buffers.

It's also a semantic distinction as to how separate things actually are at the DSP level, since for example in a 5.1 ring modulator the six buffers of the carrier input are processed as a bundle in one way, and (assuming a mono modulator input) the one buffer of the modulator input is processed as a separate bundle in a different way.  From that POV, it's not seven independent mono inputs to the DSP code.


We
could have elaborate XML descriptions or whatever to figure out how
to connect things, but I don't see any need to bring it down to the
low (ie process() call) levels of the API.

Gak!  Please nothing at the API level that needs to be parsed!  Think instead of an enum used throughout GMPI, with one value per multichanel format, as a pin property that the plug advertises to the host at connection time.  For expansion & futureproofing, maybe we have two fields: the gmpiMultichannelAudioFormatID (the enum) and a separate NumBuffers (redundant to the enum, but always provided anyway).  To address open-ended user-configurable formats, let's make the first enum value be kGmpiMultichannelAudioFormatID_BagOfChannels.

As someone else said, there could be a standard 'GmpiMultichannelFormats.Config' file format for hosts, defining the available gmpiMultichannelAudioFormatID values, with the number of channels and channel labels & hint values for each format (and actually XML wouldn't be a bad choice for that*), but the host would only read that at launch time; by plug connection time, it would all be boiled down to binary, and at process() time it would in most cases be completely irrelevant.  Plugs can only conform to format definitions available at the time they're written; so all the config file can do is help older hosts keep up with new plugs, and provide a standard mechanism for distributing new official format definitions.

        -- Chris

* Like so?:

  <(insert DTD reference here)>

  <gmpiMultichannelAudioFormatList>

        <formatDefinition ID="0" Name="Bag of Channels"            /
            <!-- NumChanels varies on a case-by-case basis -->     /
            <!-- Always take from numBuffers field -->
            NumChannels="undefined"                                /
            Symbol ="kGmpiMultichannelAudioFormatID_BagOfChannels" >
          <channelDefinition bufferIndex="(use channel index)" Label="(use channel index)" /
                                                                  Symbol="kGmpiMultichannelAudioChannel_BagChannel"       Hint=  "0">
        </formatDefinition>

        <formatDefinition ID="1" Name="Mono"                       /
            NumChannels="1"                                        /
            Symbol="kGmpiMultichannelAudioFormatID_Mono"           >
          <channelDefinition bufferIndex="0" Label="Mono"          Symbol="kGmpiMultichannelAudioChannel_Mono"            Hint=  "1">
        </formatDefinition>

        <formatDefinition ID="2" Name="Stereo"                     /
            Symbol="kGmpiMultichannelAudioFormatID_Stereo"         /
            NumChannels="2"                                        >
          <channelDefinition bufferIndex="0" Label="Left"          Symbol="kGmpiMultichannelAudioChannel_Stereo_Left"     Hint=  "2">
          <channelDefinition bufferIndex="1" Label="Right"         Symbol="kGmpiMultichannelAudioChannel_Stereo_Right"    Hint=  "3">
        </formatDefinition>

        ....

        <formatDefinition ID="15" Name="5.1"                       /
            NumChannels="6"                                        /
            Symbol="kGmpiMultichannelAudioFormatID_5_1             >
          <channelDefinition bufferIndex="0" Label="Front Left"    Symbol="kGmpiMultichannelAudioChannel_5_1_FrontLeft"   Hint= "37">
          <channelDefinition bufferIndex="1" Label="Front Center"  Symbol="kGmpiMultichannelAudioChannel_5_1_FrontCenter" Hint= "38">
          <channelDefinition bufferIndex="2" Label="Front Right"   Symbol="kGmpiMultichannelAudioChannel_5_1_FrontRight"  Hint= "39">
          <channelDefinition bufferIndex="3" Label="Rear Left"     Symbol="kGmpiMultichannelAudioChannel_5_1_RearLeft"    Hint= "40">
          <channelDefinition bufferIndex="4" Label="Rear Right"    Symbol="kGmpiMultichannelAudioChannel_5_1_RearRight"   Hint= "41">
          <channelDefinition bufferIndex="5" Label="Low Frequency" Symbol="kGmpiMultichannelAudioChannel_5_1_LowFreq"     Hint= "42">
        </formatDefinition>

        ...

  </gmpiMultichannelAudioFormatList>

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