• 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
Defining multiple custom AU views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Defining multiple custom AU views


  • Subject: Defining multiple custom AU views
  • From: Ken Schutte <email@hidden>
  • Date: Thu, 15 Apr 2010 17:32:51 -0500

Hi,

I'm trying to create multiple views for an Audio Unit.  I'm getting
tripped up by the definition of AudioUnitCocoaViewInfo:

typedef struct AudioUnitCocoaViewInfo {
   CFURLRef     mCocoaAUViewBundleLocation;
   CFStringRef  mCocoaAUViewClass[1];
} AudioUnitCocoaViewInfo;


Isn't that saying mCocoaAUViewClass is an array of CFStringRef with
length fixed at 1?  I see hosts accessing mCocoaAUViewClass[i] (for i
> 0).

I've seen that to get the number of views, hosts should use:
  UInt32 numberOfClasses = (dataSize - sizeof(CFURLRef)) / sizeof(CFStringRef);

So, in my GetPropertyInfo, I set OutDataSize to:
  sizeof(CFURLRef) + num_views * sizeof(CFStringRef)


In my GetProperty(), for one view, I'm doing something like:

AudioUnitCocoaViewInfo cocoaInfo;
cocoaInfo.mCocoaAUViewBundleLocation = bundleURL;
cocoaInfo.mCocoaAUViewClass[0] =
        CFStringCreateWithCString(NULL,
       "my_view_factory", kCFStringEncodingUTF8);

*((AudioUnitCocoaViewInfo*) outData) = cocoaInfo;


Maybe I don't understand CFStringRef and how to allocate and
initialize them...   Can someone give me a hint here?

Thanks,
Ken
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Defining multiple custom AU views
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: iPad USB Audio Class 1
  • Next by Date: iPad as a USB audio interface Was: Re: iPad USB Audio Class 1
  • Previous by thread: Re: Rtp midi ipad/phone
  • Next by thread: Re: Defining multiple custom AU views
  • Index(es):
    • Date
    • Thread