Class OutputEndpoint
Inheritance
OutputEndpoint
Assembly: Melanchall.DryWetMidi.dll
public sealed class OutputEndpoint : MidiEndpoint, IOutputEndpoint, IDisposable
Properties
Gets the name of the current MIDI device.
Declaration
public override string Name { get; }
Property Value
Overrides
Methods
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current object. |
Returns
| Type |
Description |
| bool |
true if the specified object is equal to the current object; otherwise, false. |
Overrides
Retrieves all output MIDI devices presented in the system.
Declaration
public static ICollection<OutputEndpoint> GetAll()
Returns
Exceptions
Retrieves a first output MIDI device with the specified name.
Declaration
public static OutputEndpoint GetByName(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
The name of an output MIDI device to retrieve. |
Returns
| Type |
Description |
| OutputEndpoint |
Output MIDI device with the specified name. |
Exceptions
| Type |
Condition |
| ArgumentException |
One of the following errors occurred:
-
name is null or contains white-spaces only. -
name specifies an output MIDI device which is not presented in the system.
|
| NativeApiException |
An error occurred. |
| PlatformNotSupportedException |
This operation is not supported on the current operating system. |
Retrieves the number of output MIDI devices presented in the system.
Declaration
public static int GetEndpointsCount()
Returns
| Type |
Description |
| int |
Number of output MIDI devices presented in the system. |
Exceptions
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object. |
Overrides
Returns current value of the specified property attached to the current output endpoint.
Declaration
public object GetProperty(OutputEndpointProperty property)
Parameters
Returns
| Type |
Description |
| object |
The current value of the property. |
Exceptions
Returns the list of the properties supported by output devices on the current
operating system.
Declaration
public static OutputEndpointProperty[] GetSupportedProperties()
Returns
| Type |
Description |
| OutputEndpointProperty[] |
The list of the properties supported by output devices on the current
operating system. |
Exceptions
Prepares output MIDI device for sending events to it allocating necessary
resources.
Declaration
public void PrepareForEventsSending()
Exceptions
Sends a MIDI event to the current output endpoint.
Declaration
public void SendEvent(MidiEvent midiEvent)
Parameters
| Type |
Name |
Description |
| MidiEvent |
midiEvent |
MIDI event to send. |
Exceptions
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type |
Description |
| string |
A string that represents the current object. |
Overrides
Turns off all notes that were turned on by sending Note On events, and which haven't
yet been turned off by respective Note Off events.
Declaration
public void TurnAllNotesOff()
Exceptions
Events
Occurs when a MIDI event is sent.
Declaration
public event EventHandler<MidiEventSentEventArgs> EventSent
Event Type
Operators
Declaration
public static bool operator ==(OutputEndpoint outputEndpoint1, OutputEndpoint outputEndpoint2)
Parameters
Returns
| Type |
Description |
| bool |
true if the devices are equal, false otherwise. |
Declaration
public static bool operator !=(OutputEndpoint outputEndpoint1, OutputEndpoint outputEndpoint2)
Parameters
Returns
| Type |
Description |
| bool |
false if the devices are equal, true otherwise. |
Implements