Exemplo n.º 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;
        }
Exemplo n.º 2
0
 private static extern int midiStreamPosition(int handle, ref Time t, int sizeOfTime);
Exemplo n.º 3
0
 public static extern int midiStreamPosition(IntPtr handle, ref Time t, int sizeOfTime);