• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MusicDevice mono/stereo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MusicDevice mono/stereo


  • Subject: Re: MusicDevice mono/stereo
  • From: Marc Poirier <email@hidden>
  • Date: Fri, 21 Nov 2003 09:38:29 -0600 (CST)

On Fri, 21 Nov 2003, Mark's Studio wrote:

> What do i have to do to make my musicdevice show up in both the mono
> and stereo plugin menu in logic?
>
> this is what i do now
> SampleEffectUnit::SampleEffectUnit(AudioUnit
> component):MusicDeviceBase(component,0,1,0)


U want 2 override SupportedNumChannels. I'm not at home now, so you ought
to double check that I got all the stub right for that AUBase method, but
you'll want to add I think:

virtual UInt32 SupportedNumChannels(AUChannelInfo ** outInfo);

in the public part of your class definition and then implement the
function something like this:

UInt32 YourSynthClass::SupportedNumChannels(AUChannelInfo ** outInfo)
{
static AUChannelInfo synthChannels[] = { {0, 1}, {0, 2} };
if (outInfo != NULL)
*outInfo = synthChannels;
return sizeof(synthChannels) / sizeof(AUChannelInfo);
}

That way you specify that your unit can 2 specific channel configurations:
0-in/1-out and 0-in/2-out.

The reason why synthChannels is static is because it needs to live beyond
the scope of that function for the host to access the results. You could
also make it a member of your class, but since the values in it won't ever
change, it doesn't matter, either way will work.

(I tried to include all of the implementation details since I remember you
mentioning that you don't know C++ so well yet, but hopefully this didn't
come off like I'm not giving you enough credit.)

Marc
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >MusicDevice mono/stereo (From: "Mark's Studio" <email@hidden>)

  • Prev by Date: Re: AU from scratch [was: Re: can't compile SampleEffect & MultitapAU]
  • Next by Date: Re: Apple's _DLSSynth and status= 0xB0 with data1 = 91 to 95
  • Previous by thread: MusicDevice mono/stereo
  • Next by thread: Re: MusicDevice mono/stereo
  • Index(es):
    • Date
    • Thread