Re: notifying the UI from the process
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
¶meterListener);
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