0

I am successfully using a 3D Mixer Audio Unit along with a FilePlayer AudioUnit (and a Converter Unit to handle the mono input for the mixer) in a simple AUGraph (no rendering callback, just the connected nodes).

Everything works fine, even the HiPass of the occlusion effect, except that there are hearable clicks in the audio, when I'm setting the k3DMixerParam_OcclusionAttenuation.

"When I'm setting" means "while the parameter set, there's this millisecond long clicking noise."

// this produces clicks
AudioUnitSetParameter(_mixerUnit, k3DMixerParam_OcclusionAttenuation, kAudioUnitScope_Input, bus, occlusion, 0);

// azimuth & distance work fine without clicks
AudioUnitSetParameter(_mixerUnit, k3DMixerParam_Azimuth, kAudioUnitScope_Input, bus, azimuth, 0);
AudioUnitSetParameter(_mixerUnit, k3DMixerParam_Distance, kAudioUnitScope_Input, bus, distance, 0);

Note: removed result checks for improved legibility. All results are okay.

If I comment out the occlusion attenuation, setting azimuth and distance works fine, without any audible noises. The more I decrease the occlusion attenuation (e.g. with it's minimum value of -100db), the clicks get nastier and louder.

I tried increasing the maximum frames per slice, decreasing the gain, to no avail. I tried using scheduled parameters, as I thought it might be better to ramp the value, but unfortunately none of the parameters support scheduling.

Any tips what this could be and how to avoid it?

auco
  • 9,329
  • 4
  • 47
  • 54
  • Can you detect the zero crossing point, and make the change at that instant? Or is a discontinuity in the sample inevitable? – Weather Vane Mar 08 '15 at 17:11
  • I'm not sure how to detect a zero crossing point without a render callback? The setting isn't timing critical. – auco Mar 08 '15 at 17:40
  • I would still be interested in finding the cause of this issue and a potential workaround. In the meanwhile, I added a AULowPassFilter as a separate AudioUnit node and setting the param of this lowPassFilter works like a charm. – auco Mar 09 '15 at 14:48
  • I would be very grateful to you if you briefly tell how you achieved the stereo signal when connecting Converter Unit with 3D Mixer Audio Unit? How to separate the left and right channel and set them separately to 3D Audio Unit? – Harman Feb 16 '19 at 18:20

0 Answers0