• 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
Getting AUEventListener to Work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting AUEventListener to Work


  • Subject: Getting AUEventListener to Work
  • From: Mark Coniglio <email@hidden>
  • Date: Wed, 16 Apr 2008 08:01:39 +0200

Hi,

In my Carbon application, which hosts AU plugins, I want to know if some param was changed in the plugin's User Interface.

I added code to create a listener with AUEventListenerCreate like so:

CFRunLoopRef runLoop = (CFRunLoopRef) ::GetCFRunLoopFromEventLoop(GetCurrentEventLoop());
CFStringRef loopMode = kCFRunLoopDefaultMode;


err = ::AUEventListenerCreate(StaticAUEventListenerProc,
		NULL,
		runLoop,
		loopMode,
		100,
		100,
		outListener);

That's straight out of the code documentation from the web site.

Then for each input parameter on each Audio Unit in the graph, I do this:

	AudioUnitEvent inEvent;
	inEvent.mArgument.mParameter.mAudioUnit = inAudioUnit;
	inEvent.mArgument.mParameter.mParameterID = inID;
	inEvent.mArgument.mParameter.mScope = inScope;
	inEvent.mArgument.mParameter.mElement = inElement;

	inEvent.mEventType = kAudioUnitEvent_ParameterValueChange;
	err = ::AUEventListenerAddEventType(inListener, inRefCon, &inEvent);
	Assert_(err == noErr);

But when I change params in the plugin's User Interface (whether custom or the standard Apple one) I get no notifications about the changes in my callback.

My application is Carbon Event based... so I reckon that makes it OK to receive the events from the run loop.

I thought that if I added these event notifications, any time the parameter was changed I'd be alerted to it via the callback. Am I missing something here?

Best Wishes,
Mark

--
=====================================================================
Mark Coniglio, Artistic Co-Director | email@hidden
Troika Ranch Dance Theater          | http://www.troikaranch.org
                                    | Mobile: +49 0160 9873 9680
=====================================================================
_______________________________________________
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: Multichannel Devices With mChannelsPerFrame == 1?
  • Next by Date: using audio units from a command line utility
  • Previous by thread: Re: Multichannel Devices With mChannelsPerFrame == 1?
  • Next by thread: using audio units from a command line utility
  • Index(es):
    • Date
    • Thread