문제

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.

도움이 되었습니까?

해결책

  • 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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top