// Token: 0x0600332D RID: 13101 RVA: 0x00147E64 File Offset: 0x00146064 protected override void ReadContent(MidiReader reader, ReadingSettings settings, int size) { InvalidMetaEventParameterValuePolicy invalidMetaEventParameterValuePolicy = settings.InvalidMetaEventParameterValuePolicy; this.Key = (sbyte)KeySignatureEvent.ProcessValue((int)reader.ReadSByte(), "Key", -7, 7, invalidMetaEventParameterValuePolicy); this.Scale = (byte)KeySignatureEvent.ProcessValue((int)reader.ReadByte(), "Scale", 0, 1, invalidMetaEventParameterValuePolicy); }
/// <summary> /// Determines whether the specified event is equal to the current one. /// </summary> /// <param name="keySignatureEvent">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(KeySignatureEvent keySignatureEvent, bool respectDeltaTime) { if (ReferenceEquals(null, keySignatureEvent)) { return(false); } if (ReferenceEquals(this, keySignatureEvent)) { return(true); } return(base.Equals(keySignatureEvent, respectDeltaTime) && Key == keySignatureEvent.Key && Scale == keySignatureEvent.Scale); }
// Token: 0x06003236 RID: 12854 RVA: 0x00147318 File Offset: 0x00145518 private static bool TrySkipDefaultKeySignature(MidiEvent midiEvent, ref bool skip) { if (skip) { KeySignatureEvent keySignatureEvent = midiEvent as KeySignatureEvent; if (keySignatureEvent != null) { if (keySignatureEvent.Key == 0 && keySignatureEvent.Scale == 0) { return(true); } skip = false; } } return(false); }
/// <summary> /// Determines whether the specified event is equal to the current one. /// </summary> /// <param name="keySignatureEvent">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(KeySignatureEvent keySignatureEvent) { return(Equals(keySignatureEvent, true)); }