Beispiel #1
0
        /// <summary>
        /// Get names of installed devices.
        /// インストール済みのデバイス名を得ます。
        /// </summary>
        /// <returns></returns>
        public static string[] GetDeviceNames()
        {
            uint devs = Win32.midiOutGetNumDevs();

            string[] devNames = new string[devs];
            for (uint i = 0; i < devs; i++)
            {
                Win32.MidiOutCaps caps = new Win32.MidiOutCaps();
                Win32.midiOutGetDevCaps(i, out caps, Win32.SizeOfMidiOutCaps);
                devNames[i] = caps.szPname;
            }
            return(devNames);
        }
Beispiel #2
0
 /// <summary>
 /// Get names of installed devices.
 /// �C���X�g�[���ς݂̃f�o�C�X���𓾂܂��B
 /// </summary>
 /// <returns></returns>
 public static string[] GetDeviceNames()
 {
     uint devs = Win32.midiOutGetNumDevs();
     string[] devNames = new string[devs];
     for (uint i = 0; i < devs; i++)
     {
         Win32.MidiOutCaps caps = new Win32.MidiOutCaps();
         Win32.midiOutGetDevCaps(i, out caps, Win32.SizeOfMidiOutCaps);
         devNames[i] = caps.szPname;
     }
     return devNames;
 }