Inheritance: INativeObject, IDisposable
Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
		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;
		}