상속: INativeObject, IDisposable
예제 #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;
        }
예제 #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;
		}