• 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
Using parameter listeners
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using parameter listeners


  • Subject: Using parameter listeners
  • From: "P. Grütter" <email@hidden>
  • Date: Wed, 2 Apr 2008 12:59:57 +0200

Hello,
I'm an AU newbie. I'm using VSTGUI 3.0 for the UI. Now I have some problems with the parameter listener system:


In my View class I've installed a listener to pass parameter changes to my UI:

if (AUListenerCreate(AUView_ParameterListenerDispatcher, this, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode, 0.04f, &AUView_ParameterListener) != noErr)
AUView_ParameterListener = NULL;


	AudioUnitParameter parameter = {unit, 0, kAudioUnitScope_Global, 0 };
	if (AUView_ParameterListener != NULL)
	{
		for (AudioUnitParameterID i = 0; i < kNumberOfParameters; i++)
		{
			parameter.mParameterID = i;
			AUListenerAddParameter(AUView_ParameterListener, editor, &parameter);
		}
	}

This is the dispatcher:

static void AUView_ParameterListenerDispatcher(void *inRefCon, void *inObject, const AudioUnitParameter *inParameter, Float32 inValue)
{
if ((inObject == NULL) || (inParameter == NULL))
return;


((MyEditor*)inObject)->setParameter (inParameter->mParameterID, inValue);
}


The problem is that the dispatcher is called for all parameters instead only for one the user is currently changing in the UI. I change my parameters with

AudioUnitParameter parameter = {(AudioUnit)effect, index, kAudioUnitScope_Global, 0};
AUParameterSet (NULL, NULL, &parameter, value, 0);


at the end of the VSTGUI method valueChanged(); I noticed that the parameters in AU Lab's generic view don't get highlighted when I change them in my custom UI (in a second UI instance), so maybe this way of changing parameters is wrong?


The second thing is that I need to be informed about parameter changes inside of my AU because some parameters may change other parameters. I've read about the Meta Parameters but I don't get it working. I've tried to install a parameter listener in my AU class just like above but the dispatcher never gets called.


Thanks for any help.

Cheers, Paul

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Prev by Date: Re: AudioUnitScheduleParameter + AUVarispeed
  • Next by Date: Re: HAL user-land audio driver
  • Previous by thread: Re: AUVarispeed strangeness
  • Next by thread: Re: HAL user-land audio driver
  • Index(es):
    • Date
    • Thread