Beispiel #1
0
        internal uint GetPortCount()
        {
            if (!EnsureDevice())
            {
                return(0);
            }

            try {
                uint count = RtMidiC.GetPortCount(Handle);
                CheckForError();
                return(count);
            } catch (Exception) {
                Program.Log("Error while getting number of ports");
                return(0);
            }
        }
        /// <summary>
        /// Get number of available ports for this device type
        /// </summary>
        /// <returns>Number of ports</returns>
        internal uint GetPortCount()
        {
            if (!EnsureDevice())
            {
                return(0);
            }

            try
            {
                var count = RtMidiC.GetPortCount(_handle);
                CheckForError();
                return(count);
            }
            catch (Exception e)
            {
                Log.Error(e, "Error while getting number of ports");
                return(0);
            }
        }