// Token: 0x060033BA RID: 13242 RVA: 0x001486D0 File Offset: 0x001468D0 public void Write(MidiEvent midiEvent, MidiWriter writer, WritingSettings settings, bool writeStatusByte) { if (writeStatusByte) { writer.WriteByte(byte.MaxValue); } UnknownMetaEvent unknownMetaEvent = midiEvent as UnknownMetaEvent; byte statusByte; if (unknownMetaEvent != null) { statusByte = unknownMetaEvent.StatusByte; } else { Type type = midiEvent.GetType(); if (!StandardEventTypes.Meta.TryGetStatusByte(type, out statusByte)) { EventTypesCollection customMetaEventTypes = settings.CustomMetaEventTypes; if (customMetaEventTypes != null) { bool flag = !customMetaEventTypes.TryGetStatusByte(type, out statusByte); } } } writer.WriteByte(statusByte); int size = midiEvent.GetSize(settings); writer.WriteVlqNumber(size); midiEvent.Write(writer, settings); }
/// <summary> /// Determines whether the specified event is equal to the current one. /// </summary> /// <param name="unknownMetaEvent">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(UnknownMetaEvent unknownMetaEvent, bool respectDeltaTime) { if (ReferenceEquals(null, unknownMetaEvent)) { return(false); } if (ReferenceEquals(this, unknownMetaEvent)) { return(true); } return(base.Equals(unknownMetaEvent, respectDeltaTime) && ArrayUtilities.Equals(Data, unknownMetaEvent.Data)); }
/// <summary> /// Determines whether the specified event is equal to the current one. /// </summary> /// <param name="unknownMetaEvent">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(UnknownMetaEvent unknownMetaEvent) { return(Equals(unknownMetaEvent, true)); }