Creating an envelope
I'm hoping someone on here will be able to point me in the right direction with regards to creating an envelope.
My aim is to create an envelope for AEAudioFilePlayer with at the very least an attack and release. Where I'm at currently is that I've setup a timing callback within a subclassed version of AEAudioFilePlayer, and am successfully receiving calls to this function. From here I have been able to alter the 'volume' property in order to create a change in volume over time.
The problem that I foresee with this approach is that it incurs the objective-c messaging overhead as I'm altering it via the dot operator, which will cause things to slow down later as I create more instances. I'm also doubtful as too how often the volume property is accessed within the engine for the same reason, so I'm assuming that I can get finer control of the gain over time via a different approach.
Can anyone shed some light on how I would achieve this?
Thanks in advance!