public static AudioComponent FindNextComponent(AudioComponent cmp, AudioComponentDescription cd) { // Getting component hanlder IntPtr handle; if (cmp == null) handle = AudioComponentFindNext(IntPtr.Zero, cd); else handle = AudioComponentFindNext(cmp.Handle, cd); // creating an instance if (handle != IntPtr.Zero) return new AudioComponent (handle); else return null; }
public int AddNode(AudioComponentDescription cd) { int node = 0; int err = AUGraphAddNode(handle, cd, ref node); if (err != 0) throw new ArgumentException(String.Format("Error code:", err)); return node; }
static extern int AUGraphNodeInfo(IntPtr inGraph, int inNode, AudioComponentDescription outDescription, IntPtr outAudioUnit);
static extern int AUGraphAddNode(IntPtr inGraph, AudioComponentDescription inDescription, ref int outNode);
public static AudioComponent FindComponent(AudioComponentDescription cd) { return FindNextComponent(null, cd); }
static extern IntPtr AudioComponentFindNext(IntPtr inComponent, AudioComponentDescription inDesc);