Question

I would like to access my AudioUnit Component Kernel members from an action method defined in the cocoa view of my AudioUnit Component :

- (IBAction)iaParam1Changed:(id)sender {
    float floatValue = [sender floatValue];
    NSAssert(AUParameterSet(mParameterListener, sender, &mParameter[0], (Float32)floatValue, 0) == noErr, @"[MyAudioUnit_CocoaView iaParam1Changed:] AUParameterSet()");
    if (sender == uiParam1Slider) {
        [uiParam1TextField setFloatValue:floatValue];
    } else {
        [uiParam1Slider setFloatValue:floatValue];
    }
}

(For instance, interact with stats computed on the signal...). But I don't know how to use the AudioUnit mAU member of the Cocoa View to get the Kernel (and then its members)... How would you do that? (Maybe i'm not supposed to do that?) Thanks.

Was it helpful?

Solution

  • Define an AudioUnit custom property
  • Access it from the cocoa view using AudioUnitGetProperty
  • Reimplement the AUEffectBase::GetProperty method
  • From GetProperty, access the kernels using the GetKernel(...) method
  • Enjoy some tee
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top