• 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: notifying the UI from the process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: notifying the UI from the process


  • Subject: Re: notifying the UI from the process
  • From: Marc Poirier <email@hidden>
  • Date: Thu, 26 Jan 2006 17:00:16 -0500

Well that should work, I think. Or at least similar code has worked for me. So the problem is that UrbParameterListenerProc() is never being called? Do you get an error code returned from AUListenerCreate () or AUListenerAddParameter()? Have you tested to insure that, where ever in your code the call to AUParameterListenerNotify() is made, that that code is being reached?

Marc



On Jan 26, 2006, at 12:33 PM, Peter Thom wrote:

Yeah, I wasn't sure if the two functions would be sufficient to tell.
Here is how I create the listener, and add a parameter, all done in the CreateUI function:


	// create the parameter listener
	AUListenerCreate(UrbParameterListenerProc, this,
		CFRunLoopGetCurrent(), kCFRunLoopDefaultMode, 0.010f, // 10 ms
		&parameterListener);

	triggerVUAUP.mAudioUnit = GetEditAudioUnit();
	triggerVUAUP.mScope = kAudioUnitScope_Global;
	triggerVUAUP.mElement = 0;
	triggerVUAUP.mParameterID = kaudio_unit_trigger_vu;
	AUListenerAddParameter(parameterListener, this, &triggerVUAUP);



Here is the ListenerProc I use

static void UrbParameterListenerProc(void * inUserData, void * inObject, const AudioUnitParameter * inParameter, Float32 inValue)
{
UrbView * bud = (UrbView*) inUserData;
if ( (bud != NULL) && (inParameter != NULL) )
{
switch (inParameter->mParameterID)
{
case kaudio_unit_trigger_vu:
bud->TriggerVU(inParameter->mElement, inValue);
break;
default:
break;
}
}
}



the _messengerParam gets created in the process initialization routine:


	_messengerParam.mAudioUnit = GetComponentInstance();
	_messengerParam.mParameterID = kaudio_unit_trigger_vu;
	_messengerParam.mScope = kAudioUnitScope_Global;
	_messengerParam.mElement = 0;


Do you need more information?

Peter

_______________________________________________ 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: 
 >Did GarageBand stop playing? (From: Daniel Jalkut <email@hidden>)
 >Re: Did GarageBand stop playing? (From: kelly jacklin <email@hidden>)
 >Re: Did GarageBand stop playing? (From: Daniel Jalkut <email@hidden>)
 >Re: Did GarageBand stop playing? (From: William Stewart <email@hidden>)
 >notifying the UI from the process (From: Peter Thom <email@hidden>)
 >Re: notifying the UI from the process (From: Marc Poirier <email@hidden>)

  • Prev by Date: Re: Accessing underlying AUGraph being used by quicktime
  • Next by Date: Converting a QT audio importer to a CoreAudio codec - where to start?
  • Previous by thread: Re: notifying the UI from the process
  • Next by thread: CoreAudio Swiki [was: Re: notifying the UI from the process]
  • Index(es):
    • Date
    • Thread