Win32 MidiIn ����N���X
Inheritance: IDisposable
コード例 #1
0
 public void CloseIn()
 {
     if (midiIn != null)
     {
         midiIn.Stop();
         midiIn.OnLongMsg -= OnLongMessage;
         midiIn.OnShortMsg -= OnShortMessage;
         midiIn.Close();
         midiIn = null;
     }
 }
コード例 #2
0
 public void OpenIn(int index)
 {
     CloseIn();
     try
     {
         midiIn = new MidiIn(index);
         midiIn.OnLongMsg += OnLongMessage;
         midiIn.OnShortMsg += OnShortMessage;
         midiIn.Start();
     }
     catch (Exception ex)
     {
         Trace.WriteLine("Error occured: " + ex.ToString());
     }
 }