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

ClassInfo save and restore in Reverb AU


  • Subject: ClassInfo save and restore in Reverb AU
  • From: Craig Bakalian <email@hidden>
  • Date: Mon, 29 Dec 2003 07:00:18 -0500

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.

  • Prev by Date: Re: Developing Tool for Audio program
  • Next by Date: I want to write a simple music player.
  • Previous by thread: [ANN] Audio IPC framework and SDK
  • Next by thread: I want to write a simple music player.
  • Index(es):
    • Date
    • Thread