Beispiel #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;
        }
Beispiel #2
0
 private static extern int midiStreamPosition(int handle, ref Time t, int sizeOfTime);
 public static extern int midiStreamPosition(IntPtr handle, ref Time t, int sizeOfTime);