Пример #1
0
    /// <summary>
    /// Close the MIDI device (if opened) when destroying the script.
    /// </summary>
    private void OnDestroy()
    {
        if (output != null)
        {
            Debug.Log("Closing MIDI device " + openedOutputDevice);

            try
            {
                output.Close();
            }
            catch { }

            openedOutputDevice = -1;
        }
    }
Пример #2
0
 public void Unload()
 {
     if (_MIDISequence != null)
     {
         _MIDISequence.Clear();
     }
     if (_MIDIOutDevice != null)
     {
         _MIDIOutDevice.Close();
     }
 }