Ejemplo n.º 1
0
        /// <summary>
        /// Determines whether the specified event is equal to the current one.
        /// </summary>
        /// <param name="setTempoEvent">The event to compare with the current one.</param>
        /// <param name="respectDeltaTime">If true the <see cref="MidiEvent.DeltaTime"/> will be taken into an account
        /// while comparing events; if false - delta-times will be ignored.</param>
        /// <returns>true if the specified event is equal to the current one; otherwise, false.</returns>
        public bool Equals(SetTempoEvent setTempoEvent, bool respectDeltaTime)
        {
            if (ReferenceEquals(null, setTempoEvent))
            {
                return(false);
            }

            if (ReferenceEquals(this, setTempoEvent))
            {
                return(true);
            }

            return(base.Equals(setTempoEvent, respectDeltaTime) &&
                   MicrosecondsPerBeat == setTempoEvent.MicrosecondsPerBeat);
        }
Ejemplo n.º 2
0
 // Token: 0x06003235 RID: 12853 RVA: 0x001472E4 File Offset: 0x001454E4
 private static bool TrySkipDefaultSetTempo(MidiEvent midiEvent, ref bool skip)
 {
     if (skip)
     {
         SetTempoEvent setTempoEvent = midiEvent as SetTempoEvent;
         if (setTempoEvent != null)
         {
             if (setTempoEvent.MicrosecondsPerQuarterNote == 500000L)
             {
                 return(true);
             }
             skip = false;
         }
     }
     return(false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Determines whether the specified event is equal to the current one.
 /// </summary>
 /// <param name="setTempoEvent">The event to compare with the current one.</param>
 /// <returns>true if the specified event is equal to the current one; otherwise, false.</returns>
 public bool Equals(SetTempoEvent setTempoEvent)
 {
     return(Equals(setTempoEvent, true));
 }