I have an implementation of the RenderTone method for sound playback and from that method I want to call controller methods. I’m able to acces controller members fine like this:
InstrumentGridViewController *viewController = (InstrumentGridViewController *)inRefCon;
viewController->count = 7;
But what I want to do is call a method the same way. I tried this but it’s not working:
viewController->stopToneUnit;
My method implementation looks like this:
- (void) stopToneUnit{
AudioOutputUnitStop(toneUnit);
AudioUnitUninitialize(toneUnit);
AudioComponentInstanceDispose(toneUnit);
toneUnit = nil;
}
How should I call this method?
In Objective-C the syntax for sending messages is: