• 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: Update: Saving the state of a music device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update: Saving the state of a music device


  • Subject: Re: Update: Saving the state of a music device
  • From: William Stewart <email@hidden>
  • Date: Mon, 10 Sep 2007 14:36:49 -0700


On 10/09/2007, at 10:42 AM, Todd Blanchard wrote:

FWIW, I've tried saving and restoring the present preset as well - but it always returns 0xFFFFFFFF Untitled as the preset.

That's just the name and the number. The -1 is correct for this property when the state of the AU is a user preset


You get this right by doing what I said in my previous email (which was about saving presets in a document). If you want to save a preset file, then to get the name right, you should set the preset name first before getting the ClassInfo:

    AUPreset presetToSet;
    presetToSet.presetName = (CFStringRef)inPresetName;
    presetToSet.presetNumber = -1;

ComponentResult result = AudioUnitSetProperty ( mAudioUnit,
kAudioUnitProperty_PresentPreset,
kAudioUnitScope_Global,
0,
&presetToSet,
sizeof(AUPreset) );


    // now get classInfo & write to file
    CFPropertyListRef classInfo = NULL;
    UInt32 dataSize = sizeof(CFPropertyListRef);
    result = AudioUnitGetProperty (	mAudioUnit,
                                    kAudioUnitProperty_ClassInfo,
                                    kAudioUnitScope_Global,
                                    0,
                                    &classInfo,
                                    &dataSize);

Bill


Digital Performer gets it right - but I can't figure out how.

On Sep 9, 2007, at 10:32 PM, Todd Blanchard wrote:

I've got saving working well mostly - but there are few snags. Prior to saving state, I call AUGraphGetNodeInfo(graph, node, 0, 0, &properties,0) to get the properties memento from the audio unit. On restarts, I provide this memento in AUGraphNewNode to restore the state of the unit. Works great - sometimes.

It doesn't seem to work with the Korg Digital Legacy Collection (M1 and Wavestation emulators).

I'm not sure what I need to do to save the state of these puppies. The M1 in particular seems odd as it operates in a couple different modes - a multi timbral mode, and a straightI'm open to suggestions?


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


This email sent to email@hidden

_______________________________________________ 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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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


References: 
 >Saving the state of a music device (From: Todd Blanchard <email@hidden>)
 >Update: Saving the state of a music device (From: Todd Blanchard <email@hidden>)

  • Prev by Date: Re: ALAC bit depth hint
  • Next by Date: Re: Graphical performance of AU's.
  • Previous by thread: Update: Saving the state of a music device
  • Next by thread: Re: Saving the state of a music device
  • Index(es):
    • Date
    • Thread