Xeno-rat
Loading...
Searching...
No Matches
NAudio.Midi.MidiEventComparer Class Reference

Utility class for comparing MidiEvent objects. More...

Inheritance diagram for NAudio.Midi.MidiEventComparer:
Collaboration diagram for NAudio.Midi.MidiEventComparer:

Public Member Functions

int Compare (MidiEvent x, MidiEvent y)
 Compares two MidiEvent objects based on their absolute time and returns a value indicating their relative order.
 

Detailed Description

Utility class for comparing MidiEvent objects.

Member Function Documentation

◆ Compare()

int NAudio.Midi.MidiEventComparer.Compare ( MidiEvent x,
MidiEvent y )
inline

Compares two MidiEvent objects based on their absolute time and returns a value indicating their relative order.

Parameters
xThe first MidiEvent to compare.
yThe second MidiEvent to compare.
Returns
A signed integer that indicates the relative order of the objects being compared. Less than 0: x is less than y . 0: x is equal to y . Greater than 0: x is greater than y .

This method compares the absolute time of the input MidiEvent objects. If the absolute times are equal, it further sorts the MetaEvent before note events, except for the EndTrack event. The method returns a negative value if x is to be placed before y , zero if they are equal, and a positive value if x is to be placed after y .


The documentation for this class was generated from the following file: