예제 #1
0
        public Time GetTime(TimeType type)
        {
            #region Require

            if(IsDisposed)
            {
                throw new ObjectDisposedException("OutputStream");
            }

            #endregion

            Time t = new Time();

            t.type = (int)type;

            lock(lockObject)
            {
                int result = midiStreamPosition(Handle, ref t, Marshal.SizeOf(typeof(Time)));

                if(result != MidiDeviceException.MMSYSERR_NOERROR)
                {
                    throw new OutputDeviceException(result);
                }
            }

            return t;
        }
예제 #2
0
 private static extern int midiStreamPosition(int handle, ref Time t, int sizeOfTime);
예제 #3
0
 public static extern int midiStreamPosition(IntPtr handle, ref Time t, int sizeOfTime);