Ejemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var componentDescription = new AudioComponentDescription {
                ComponentType         = AudioComponentType.Effect,
                ComponentSubType      = 0x666c7472,
                ComponentManufacturer = (AudioComponentManufacturerType)0x44656d6f,
                ComponentFlags        = 0,
                ComponentFlagsMask    = 0
            };

            AUAudioUnit.RegisterSubclass(
                new Class(typeof(AUv3FilterDemo)),
                componentDescription,
                "Local FilterDemo",
                int.MaxValue
                );

            EmbedPlugInView();

            playEngine = new SimplePlayEngine();

            playEngine.SelectEffectWithComponentDescription(componentDescription, ConnectParametersToControls);

            playEngine.AudioUnit.TransportStateBlock = (ref AUHostTransportStateFlags transportStateFlags, ref double currentSamplePosition, ref double cycleStartBeatPosition, ref double cycleEndBeatPosition) => {
                transportStateFlags = AUHostTransportStateFlags.Recording;

                currentSamplePosition  = 10.0;
                cycleStartBeatPosition = 0.0;
                cycleEndBeatPosition   = 20.0;

                return(true);
            };
        }
Ejemplo n.º 2
0
            public AUAudioUnit CreateAudioUnit(AudioComponentDescription desc, out NSError error)
            {
                var audioUnit = new AUAudioUnit(desc, out error);

                return(audioUnit);
            }
 public AUAudioUnit CreateAudioUnit(AudioComponentDescription desc, out NSError error)
 {
     audioUnit = new AUAudioUnit(desc, AudioComponentInstantiationOptions.InProcess, out error);
     return(audioUnit);
 }