• 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: ClassInfo save and restore in Reverb AU
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ClassInfo save and restore in Reverb AU


  • Subject: Re: ClassInfo save and restore in Reverb AU
  • From: Robert Grant <email@hidden>
  • Date: Sun, 4 Jan 2004 15:43:00 -0500

Hi Craig,

I think your problem is that the generic AU UI is unable to display the names of non-factory presets. When I reproduce your case the preset name syncs properly when switching between factory presets but goes to an empty selection when a user preset is loaded from ClassInfo.

I guess this is a feature? You can always set the window title to indicate the name of the current preset ;-)

Robert.

On Dec 29, 2003, at 7:00 AM, Craig Bakalian wrote:

Hi,

The below code is working to save and restore the state of apple's
reverb unit

-(void)saveReverbUnitInfoToFile
{
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *pathWithFile = [path stringByAppendingPathComponent:
@"/ReverbData"];
if(reverbUnit)
{
CFPropertyListRef list;
UInt32 size = sizeof(CFPropertyListRef);
AudioUnitGetProperty(reverbUnit,
kAudioUnitProperty_ClassInfo,kAudioUnitScope_Global, 0, &list, &size);
[NSArchiver archiveRootObject: (NSDictionary *)list toFile:
pathWithFile];
}
}

-(void)restoreReverbUnitFromFile
{
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *pathWithFile = [path stringByAppendingPathComponent:
@"/ReverbData"];
if( [[NSFileManager defaultManager] fileExistsAtPath: pathWithFile])
{
if(reverbUnit)
{
NSDictionary *dict = [NSUnarchiver unarchiveObjectWithFile:
pathWithFile];
CFPropertyListRef list = (CFPropertyListRef)dict;
UInt32 size = sizeof(CFPropertyListRef);
AudioUnitSetProperty(reverbUnit,
kAudioUnitProperty_ClassInfo,kAudioUnitScope_Global, 0, &list, size);
}
}
}

However, the popup menu for the presets is not updated when my
CarbonView is displayed

err = AudioUnitCarbonViewCreate(editView, editUnit, carbonWindow,
rootControl, &location, &size, &viewPanel);

In the docs I see ways to set? the presets, yet will this update the
popup menu in the AUCarbonView?



Craig Bakalian
www.eThinkingCap.com
_______________________________________________
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.

  • Prev by Date: Re: audio file bug in AudioUnitHosting
  • Next by Date: Re: AU and Busses (or BusError?)
  • Previous by thread: Re: audio file bug in AudioUnitHosting
  • Next by thread: Re: ClassInfo save and restore in Reverb AU
  • Index(es):
    • Date
    • Thread