Re: setting the property of peak limiter
Re: setting the property of peak limiter
- Subject: Re: setting the property of peak limiter
- From: MF <email@hidden>
- Date: Mon, 19 Jan 2009 20:08:42 +0100
sorry it was the wrong version...
// peak node
AUNode peakNode;
AudioUnit peakUnit;
cd.componentType = kAudioUnitType_Effect;
cd.componentSubType = kAudioUnitSubType_PeakLimiter;
XRequireNoError (AUGraphAddNode(graph, &cd, &peakNode), "AUGraphNewNode");
XRequireNoError( AUGraphNodeInfo(graph, peakNode, 0, &peakUnit),
"AUGraphNodeInfo- output node");
XRequireNoError ( AudioUnitSetParameter (peakUnit,
kLimiterParam_PreGain, kAudioUnitScope_Global, 0, 10, 0), "set peak
limit");
On Mon, Jan 19, 2009 at 8:00 PM, MF <email@hidden> wrote:
> Hey James thanks so much!
> I have changed it to set parameter, but however it still doesn't
> work... Do I actually have to configure something before setting
> parameters for peak limiter? The following is the modified version.
>
> Thanks again for the help!!!
>
> // peak node
> AUNode peakNode;
> AudioUnit peakUnit;
>
> cd.componentType = kAudioUnitType_Effect;
> cd.componentSubType = kAudioUnitSubType_PeakLimiter;
>
> XRequireNoError (AUGraphAddNode(graph, &cd, &peakNode), "AUGraphNewNode");
> XRequireNoError( AUGraphNodeInfo(graph, peakNode, 0, &peakUnit),
> "AUGraphNodeInfo- output node");
>
> AudioStreamBasicDescription commonFormat;
> UInt32 propsize = sizeof(AudioStreamBasicDescription);
> AudioUnitGetProperty (peakUnit, kAudioUnitProperty_StreamFormat,
> kAudioUnitScope_Global, 0,
> &commonFormat, &propsize);
>
> XRequireNoError ( AudioUnitSetParameter (peakUnit, kLimiterParam_PreGain,
> kAudioUnitScope_Global, 0,
> 10,
> 0), "set peak limit");
>
>
>
> On Mon, Jan 19, 2009 at 7:23 PM, james mccartney <email@hidden> wrote:
>>
>> You should be calling AudioUnitSetParameter, and not AudioUnitSetProperty.
>>
>>
>>
>> On Jan 19, 2009, at 8:31 AM, MF wrote:
>>
>>> Hello list...
>>>
>>> I have walked through the archive about peak limiter and the setting
>>> of effect unit, but I didn't really find the discussion about the
>>> problem I have...
>>>
>>> I tried to set up a peak limiter unit in my graph, but I failed to set
>>> the property value of peaklimiter after installing it in the graph. Do
>>> I miss any procedure in my setting?
>>>
>> ...
>>
>>> XRequireNoError ( AudioUnitSetProperty (peakUnit, kLimiterParam_PreGain,
>>>
>>> kAudioUnitScope_Global, 0,
>>>
>>> &db,
>>>
>>> sizeof (db)), "set peak limit");
>>
>>
>>
>
_______________________________________________
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