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 static AudioUnit CreateInstance(AudioComponent cmp) { IntPtr handle; int err = AudioComponentInstanceNew(cmp.handle, out handle); if (err != 0) throw new AudioUnitException (err); if (handle != IntPtr.Zero) return new AudioUnit (handle); else return null; }