The AVAudioEngine
and related AVAudioNode
objects seem to be quite powerful for audio processing but it's difficult to see how to automate parameter changes with them. I'm sure there must be something more effective than manually using a Timer
to change values, as a crude example.
AVMutableAudioMixInputParameters
includes a method setVolumeRampFromStartVolume:toEndVolume:timeRange:
but I cannot see how I could integrate that with AVAudioPlayerNode
(connected with AVAudioEffectNodes) and use that method to fade the volume over time. Instead, I have only seen examples of AVMutableAudioMixInputParameters
working with AVMutableComposition
instances and none of them include AVAudioNode
objects.
Can anyone post or link to some code samples that combine the use of AVAudioNodes with setVolumeRampFromStartVolume:toEndVolume:timeRange:
or explain best practices for automating parameter changes on a node over time?
Many thanks