Пример #1
0
        public void Connections()
        {
            using (var aug = new AUGraph()) {
                aug.Open();

                var node_1 = aug.AddNode(AudioComponentDescription.CreateGenerator(AudioTypeGenerator.AudioFilePlayer));
                var node_2 = aug.AddNode(AudioComponentDescription.CreateOutput(AudioTypeOutput.Generic));

                Assert.AreEqual(AUGraphError.OK, aug.ConnnectNodeInput(node_1, 0, node_2, 0), "#1");
                uint count;
                aug.GetNumberOfInteractions(out count);
                Assert.AreEqual(1, count, "#2");

                Assert.AreEqual(AUGraphError.OK, aug.Initialize(), "#3");

                Assert.AreEqual(AUGraphError.OK, aug.ClearConnections(), "#4");
                aug.GetNumberOfInteractions(out count);
                Assert.AreEqual(0, count, "#5");
            }
        }
Пример #2
0
        public static AudioComponent FindComponent(AudioTypeGenerator generator)
        {
            var cd = AudioComponentDescription.CreateGenerator(generator);

            return(FindComponent(ref cd));
        }