Process for tearing down audio controller

Sometimes I need to tear down AEAudioController completely and create a new one with a new audio description. What parts of the audio graph am I responsible for removing when I do this? In particular:

1) all audio channels (via removeChannels)
2) all audio channel groups (via removeChannelGroup)
3) all filters (via removeFilter)

It would be nice if the audio controller just removes all of these in dealloc, but I don't know that it does.


  • There shouldn't be any memory leaks, there - i.e. AEAudioController should tear down all that stuff by itself. But instead of tearing down the lot and recreating it all, why not just set the new audio description?

     * Set a new audio description
     *  This will cause the audio controller to stop, teardown and recreate its rendering resources,
     *  then start again (if it was previously running).
     * @param audioDescription The new audio description
     * @param error On output, the error, if one occurred
     * @result YES on success, NO on failure
    - (BOOL)setAudioDescription:(AudioStreamBasicDescription)audioDescription error:(NSError**)error;
  • Awesome, didn't realize that that function existed!

Sign In or Register to comment.