• 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: AU parameter names and units
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU parameter names and units


  • Subject: Re: AU parameter names and units
  • From: Frank Schoep <email@hidden>
  • Date: Fri, 16 Feb 2007 20:38:26 +0100

On Feb 15, 2007, at 9:58 PM, William Stewart wrote:
On 15/02/2007, at 3:23 AM, Frank Schoep wrote:
...
Is there a way to flag the parameter (different unit?) or hint AU Lab to show more digits?

Try setting the HighResolution flag - I think that will add an extra digit to the display

Thanks for the suggestion, I added the flag to my parameters, but it doesn't seem to make a difference, there's still no digits after the decimal point. I take it there is no other way to change the precision other than writing a custom view?


...
Is there a way to change (multiple) parameter names on the fly?

You mark the parameter that can change other parameters as a meta parameter. You should also list the dependencies (there's a property for describing which parameters are dependent on a meta parameter).
...
That's it - the listener mechanism should take care of the rest.

This sounds pretty much what I want to do, except I'm changing parameter *names* instead of values. But I'm probably overlooking something as my AU never receives a call to GetProperty{Info,} with AudioUnitPropertyID == AUDependentParameters (== 45?).


What I did is this: first I added the flag IsGlobalMeta (later also IsElementMeta) to the "master" parameter. I then added the following piece of code to GetPropertyInfo:

	if(inScope == kAudioUnitScope_Global) {
		if(inID == kAudioUnitProperty_DependentParameters) {
			outDataSize = 2 * sizeof(AUDependentParameter);
			outWritable = false;

			return noErr;
		}
	}

I added this to GetProperty (probably not the most elegant thing you've ever seen, but I think it should do the job):

	if(inScope == kAudioUnitScope_Global) {
		if(inID == kAudioUnitProperty_DependentParameters) {
			AUDependentParameter p[2];

			p[0].mScope = kAudioUnitScope_Global;
			p[0].mParameterID = kShifterParam_P1;

			p[1].mScope = kAudioUnitScope_Global;
			p[1].mParameterID = kShifterParam_m2;

			memcpy(outData, &p, sizeof(p));

			return noErr;
		}
	}

Both of those snippets never get executed because inID is never equal to kAudioUnitProperty_DependentParameters. Even if this would work, how would my AU react to changes in the "master" parameter? I've added some code to GetParameterInfo (where parameter names are filled in), but is that the right place?

I've got a lot of questions, but most of all I'm wondering why the Is*Meta flag doesn't seem to have any effect. Do I need to post certain other sections of my code for clarity? Thanks in advance for your help!

Sincerely,

Frank

_______________________________________________
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


  • Follow-Ups:
    • Re: AU parameter names and units
      • From: William Stewart <email@hidden>
References: 
 >AU parameter names and units (From: Frank Schoep <email@hidden>)
 >Re: AU parameter names and units (From: William Stewart <email@hidden>)

  • Prev by Date: Re: Problem with AUParameterSet
  • Next by Date: Re: Problem with AUParameterSet
  • Previous by thread: Re: AU parameter names and units
  • Next by thread: Re: AU parameter names and units
  • Index(es):
    • Date
    • Thread