• 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: Parameters & Listeners & Host & Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parameters & Listeners & Host & Cocoa


  • Subject: Re: Parameters & Listeners & Host & Cocoa
  • From: William Stewart <email@hidden>
  • Date: Mon, 1 Dec 2003 17:03:14 -0800

In the AU we don't expect that an AU would need to notify parameter value changes (basically because it only should ever change parameter values itself when):
(1) An API is called to change a parameter value
(2) The case above is called on a "meta" parameter - ie. a parameter that can change the value of other parameters

(You can further specialise the definition of (2) to say "that can change the value of any other published parameter" - ie. if you are only changing internal parameter values, then strictly its not a meta parameter).

So, if we start from there, what exactly is the scenario of the problem you are describing?

Bill

On 25/11/2003, at 12:53 PM, Mark's Studio wrote:

I'm very confused about the whole parameter thing

in my AuBase/MusicDevice class i have, and that works,

ComponentResult SampleEffectUnit::GetParameter(AudioUnitParameterID
inID,AudioUnitScope inScope,AudioUnitElement inElement,Float32
&outValue)
{
if (inScope==kAudioUnitScope_Global && inElement==0){
[[cocoaController synthOutlet] getParameter:inID value:&outValue];
return noErr;
}
return AUBase::GetParameter(inID, inScope, inElement, outValue);
}

ComponentResult SampleEffectUnit::SetParameter(AudioUnitParameterID
iID, AudioUnitScope iScope, AudioUnitElement iElem, Float32 rValue,
UInt32 iSchedule)
{
if (iScope==kAudioUnitScope_Global && iElem==0){
[[cocoaController synthOutlet] setParameter:iID value:rValue];
}
return AUBase::SetParameter(iID, iScope, iElem, rValue, iSchedule);
}

but how do i get the parameter changes in the Cocoa UI to the host? i
have tried

- (void)startListner{

AUListenerCreate(CocoaParameterListener, self, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode, 0.100, &mParameterListener);
int i;
for(i=0;i<38;i++){
parameters[i].mAudioUnit = itsAU;
parameters[i].mParameterID = i;
parameters[i].mScope = kAudioUnitScope_Global;
parameters[i].mElement = 0;
AUParameterSet( mParameterListener, self, &parameters[i], 0, 0);
AUListenerAddParameter (mParameterListener, NULL, &parameters[i]);
}
}

and when i change a parameter i have tried both of these.

AudioUnitSetParameter(itsAU,34,kAudioUnitScope_Global,0,crossfade,0);
AUParameterSet( mParameterListener, self, &parameters[34], crossfade,
0);

but none of them seems to do anything to the host.

i just get lots of calls to the setParameter()





Thanks

Peter Mark

Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


-- mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Parameters & Listeners & Host & Cocoa
      • From: "Mark's Studio" <email@hidden>
  • Prev by Date: Re: AUMIDIControllerHandleMIDI
  • Next by Date: Re: Issue with kStereoMixerParam_Volume in QT6.4?
  • Previous by thread: Re: AUMIDIControllerHandleMIDI
  • Next by thread: Re: Parameters & Listeners & Host & Cocoa
  • Index(es):
    • Date
    • Thread