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

Parameters & Listeners & Host & Cocoa


  • Subject: Parameters & Listeners & Host & Cocoa
  • From: "Mark's Studio" <email@hidden>
  • Date: Tue, 25 Nov 2003 21:53:10 +0100

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.

  • Prev by Date: kAudioUnitProperty_BusCount
  • Next by Date: Re: kAudioUnitProperty_BusCount
  • Previous by thread: Re: kAudioUnitProperty_BusCount
  • Next by thread: Issue with kStereoMixerParam_Volume in QT6.4?
  • Index(es):
    • Date
    • Thread