• 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
AudioUnitScheduleParameters with kStereoMixerParam_Volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioUnitScheduleParameters with kStereoMixerParam_Volume


  • Subject: AudioUnitScheduleParameters with kStereoMixerParam_Volume
  • From: Benjamin Federer <email@hidden>
  • Date: Thu, 21 Jul 2016 19:18:18 +0200

Hello everyone

I am trying to ramp the input volume for one of the input busses of a stereo mixer unit (part of an AUGraph). Although I don’t get any errors when running my code, nothing happens at all, i.e. no audible volume changes occur. I am unsure what I am missing. Or could it be that the parameter just cannot be ramped at all – although it reports otherwise?

This is what I got so far:


AudioUnitParameter parameter = {
			.mAudioUnit = mixerUnit,
			.mParameterID = kStereoMixerParam_Volume,
			.mScope = kAudioUnitScope_Input,
			.mElement = busNumber
};

AudioUnitParameterInfo parameterInfo = {};
UInt32 parameterInfoSize = sizeof(AudioUnitParameterInfo);
error = AudioUnitGetProperty(parameter.mAudioUnit, kAudioUnitProperty_ParameterInfo, parameter.mScope, parameter.mParameterID, &parameterInfo, &parameterInfoSize);
if (error)
{
	return error;
}

AudioUnitParameterOptions parameterOptions = parameterInfo.flags;
if ((parameterOptions & kAudioUnitParameterFlag_CanRamp) != kAudioUnitParameterFlag_CanRamp)
{
	// parameter cannot be ramped-
	return paramErr;
}

AudioUnitParameterEvent parameterEvent = {
	.scope = parameter.mScope,
	.element = parameter.mElement,
	.parameter = parameter.mParameterID,
	.eventType = kParameterEvent_Ramped,
	.eventValues.ramp.startBufferOffset = 0,
	.eventValues.ramp.durationInFrames = durationInFrames,
	.eventValues.ramp.startValue = startValue,
	.eventValues.ramp.endValue = endValue
};

error = AudioUnitScheduleParameters(parameter.mAudioUnit, &parameterEvent, 1);


Thanks for any help in advance

Benjamin
 _______________________________________________
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: AudioUnitScheduleParameters with kStereoMixerParam_Volume
      • From: Matt Grippaldi <email@hidden>
  • Prev by Date: Re: exceptions to using RenderCallback
  • Next by Date: AudioUnitScheduleParameters with kStereoMixerParam_Volume
  • Previous by thread: Re: exceptions to using RenderCallback
  • Next by thread: Re: AudioUnitScheduleParameters with kStereoMixerParam_Volume
  • Index(es):
    • Date
    • Thread