Ejemplo n.º 1
0
 public Task CloseAsync()
 {
     port.Disconnect(details.Endpoint);
     port.Dispose();
     client.Dispose();
     return(Task.CompletedTask);
 }
Ejemplo n.º 2
0
 public void Dispose()
 {
     _port?.Disconnect(_endpoint);
     _port?.Dispose();
     _client?.Dispose();
     _endpoint?.Dispose();
     _port     = null;
     _client   = null;
     _endpoint = null;
 }
        public Task CloseAsync()
        {
            port.Disconnect(details.Endpoint);
            port.Dispose();
            client.Dispose();
            details.Dispose();
            return(Task.CompletedTask);

            Connection = MidiPortConnectionState.Closed;
        }
Ejemplo n.º 4
0
 public Task CloseAsync()
 {
     if (details is CoreMidiPortDetails cmDetails)
     {
         port.Disconnect(cmDetails.Endpoint);
         cmDetails.Dispose();
     }
     port.Dispose();
     client.Dispose();
     Connection = MidiPortConnectionState.Closed;
     return(Task.CompletedTask);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Releases all currently used MIDI resources.
 /// </summary>
 private void Release()
 {
     if (_inputEndpoint != null)
     {
         _inputPort.Disconnect(_inputEndpoint);
         _inputEndpoint = null;
     }
     if (_outputEndpoint != null)
     {
         _outputEndpoint = null;
     }
 }
Ejemplo n.º 6
0
 partial void StopMessageReceived()
 {
     _port.MessageReceived -= NativePortMessageReceived;
     _port.Disconnect(_endpoint);
 }