• 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
Trigger Parameter changes from SetParameter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trigger Parameter changes from SetParameter?


  • Subject: Trigger Parameter changes from SetParameter?
  • From: Kevin Dixon <email@hidden>
  • Date: Tue, 2 Nov 2010 09:21:38 -0700

I have a class descending from AUEffectBase. I want to implement a
"Link" mode where one group of parameters depends on another. For
example, two filter's corner frequency will stay the same.

So when you enable "Link", changing Freq1 updates Freq2. I implemented
this by overriding AUBase::SetParameter, essentially like this (psuedo
code)

OSStatus MyAU::SetParameter(AudioUnitParameterID inID, AudioUnitScope
inScope, AudioUnitElement inElement,
			Float32 inValue,
			UInt32 inBufferOffsetInFrames)
{
	if((inID == Filter1Freq) && (GetParameter(LinkEnable) == 1))
	{
		AUBase::SetParameter(Filter2Freq, inScope, inElement, inValue,
inBufferOffsetInFrames);
	}

	return AUBase::SetParameter(inID, inScope, inElement, inValue,
inBufferOffsetInFrames);
}

Is this an "approved" method of doing this? Would it be better to call
the super class first? Any tips appreciated! Thanks,

-Kevin
 _______________________________________________
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

  • Follow-Ups:
    • Re: Trigger Parameter changes from SetParameter?
      • From: Kevin Dixon <email@hidden>
  • Prev by Date: Re: Audio Component Count "Badness"
  • Next by Date: Xcode 3.24 and ppc64 support?
  • Previous by thread: Re: Airplay using remoteIO/audiounit failing on ios4.2GM
  • Next by thread: Re: Trigger Parameter changes from SetParameter?
  • Index(es):
    • Date
    • Thread