My code is based on this example and a stop function is already implemented, there are functions to uninitialize and stop the audio unit:
AudioOutputUnitStop(toneUnit);
AudioUnitUninitialize(toneUnit);
AudioComponentInstanceDispose(toneUnit);
toneUnit = nil;
In the example I linked to a pause function is not necessary since there's only one frequency being played so there's no difference between pause and stop. In my implementation however, I'm playing a range of different frequencies and I want to be able to pause playback.
Any ideas how this is done?