• 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: AU2 - SaveState and RestoreState
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU2 - SaveState and RestoreState


  • Subject: Re: AU2 - SaveState and RestoreState
  • From: Bill Stewart <email@hidden>
  • Date: Thu, 19 Sep 2002 11:15:51 -0700

It saves only the current state of the audio unit (whether that has been set
by a preset, or modified thorugh UI interaction, etc)

The restore is called when the user makes the AudioUnitSetProperty call
using the classdata property - the value here is a CFDictionary

This call then pulls the dictionary values out and uses them to set up the
values of the parameters on each of the elements of each scope that has been
stored in the dictionary.

If you want additional information in your audio unit to be saved/restored,
you would have to extend these two calls (you can easily add additional keys
to the dictionary) - but you should make sure that you at least have the
component ID fields and version field with the same key and value types, as
other code relies on these entries.

The -1 is used to signify a "user" preset (as against a factory preset which
are numbered using positive integers)

Bill

on 19/9/02 10:33 AM, Marc Poirier wrote:

> Are SaveState() and RestoreState() supposed to save and restore all
> presets or only the current one?
>
> Why is
> mCurrentPreset.presetNumber = -1;
> at the end of AUBase::RestoreState()?
>
> Thanks,
> 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.

--
mailto:email@hidden
tel: +1 408 974 4056

__________________________________________________________________________
"...Been havin' some trouble lately in the sausage business," C.M.O.T.
Dibbler replied.
"What, having trouble making both ends meat?"
__________________________________________________________________________
_______________________________________________
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: Playing 2 or more audio data simultaneously
  • Next by Date: Re: Playing 2 or more audio data simultaneously
  • Previous by thread: AU2 - SaveState and RestoreState
  • Next by thread: Should MIDINotifyProc work in command-line programs?
  • Index(es):
    • Date
    • Thread