• 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: cant load resources in AudioUnits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cant load resources in AudioUnits


  • Subject: Re: cant load resources in AudioUnits
  • From: Art Gillespie <email@hidden>
  • Date: Thu, 26 Sep 2002 11:15:41 -0400

To answer my own question:

For anyone who's as ignorant as I am (was):

o In Project Builder, give your bundle an identifier. Go to
Targets->Info.plists Entries->Expert View and enter something sensible
in the CFBundleIdentifier element (e.g.
com.mycompany.category.effect_name)

o Once you've done this, you can get your BundleRef simply:

BundleRef bundleRef =
CFBundleGetBundleWithIdentifier(CFSTR("com.bitshiftaudio.Effects.Filter"
));

Then you can use CFBundleOpenBundleResource(bundleRef) to set your
resource file to be the current resource.

This is vastly preferable to hard-coding a file URL since I don't think
there's anything to keep end-users from renaming the component bundles.

Best,

Art
>>0xBA

P.S. Somewhat off-topic but I'm finding browsing developer.apple.com
to be pretty painful on my 28.8k modem (yes, that's right folks)... I
was wondering what level of ADC membership would get me all these docs
in a locally browsable/searchable format.

On Thursday, September 26, 2002, at 10:14 AM, Art Gillespie wrote:

> This must be a *really* stupid question, then:
>
> Where do I get the bundleRef from within my AU?
>
> Best,
>
> Art
> >>0xBA
>
> On Thursday, September 26, 2002, at 06:24 AM, Brandon Ware wrote:
>
>> I guess it was a dumb question since nobody answered :-). The
>> bundle's resources are only opened automatically if you are an
>> application. You need to explicitly load them if you are not:
>>
>> // on open
>> rsrcs = CFBundleOpenBundleResourceMap(bundleRef);
>>
>> // when all done
>> CFBundleCloseBundleResourceMap(bundleRef, rsrcs);
>>
>> On Wednesday, September 25, 2002, at 07:23 PM,
>> email@hidden wrote:
>>
>>> Hi all,
>>>
>>> I can't seem to load resources from an AudioUnit. I cant even load
>>> the
>>> 'STR ' resources that specify the AU's name and description. Is there
>>> something special that needs to be done in order to access resources
>>> in
>>> a component?
>> _______________________________________________
>> 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.
> _______________________________________________
> 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.
_______________________________________________
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.

  • Follow-Ups:
    • Re: cant load resources in AudioUnits
      • From: Marc Poirier <email@hidden>
References: 
 >Re: cant load resources in AudioUnits (From: Art Gillespie <email@hidden>)

  • Prev by Date: Re: First AU Synth - SimpleSynth
  • Next by Date: RE: AudioUnitRender Errors
  • Previous by thread: Re: cant load resources in AudioUnits
  • Next by thread: Re: cant load resources in AudioUnits
  • Index(es):
    • Date
    • Thread