예제 #1
0
        // Token: 0x06003378 RID: 13176 RVA: 0x00147F08 File Offset: 0x00146108
        protected override void ReadContent(MidiReader reader, ReadingSettings settings, int size)
        {
            InvalidMetaEventParameterValuePolicy invalidMetaEventParameterValuePolicy = settings.InvalidMetaEventParameterValuePolicy;
            byte formatAndHours = reader.ReadByte();

            this.Format    = SmpteOffsetEvent.GetFormat(formatAndHours);
            this.Hours     = SmpteOffsetEvent.ProcessValue(SmpteOffsetEvent.GetHours(formatAndHours), "Hours", 23, invalidMetaEventParameterValuePolicy);
            this.Minutes   = SmpteOffsetEvent.ProcessValue(reader.ReadByte(), "Minutes", 59, invalidMetaEventParameterValuePolicy);
            this.Seconds   = SmpteOffsetEvent.ProcessValue(reader.ReadByte(), "Seconds", 59, invalidMetaEventParameterValuePolicy);
            this.Frames    = SmpteOffsetEvent.ProcessValue(reader.ReadByte(), "Frames", SmpteOffsetEvent.MaxFrames[this.Format], invalidMetaEventParameterValuePolicy);
            this.SubFrames = SmpteOffsetEvent.ProcessValue(reader.ReadByte(), "SubFrames", 99, invalidMetaEventParameterValuePolicy);
        }
예제 #2
0
        /// <summary>
        /// Determines whether the specified event is equal to the current one.
        /// </summary>
        /// <param name="smpteOffsetEvent">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(SmpteOffsetEvent smpteOffsetEvent, bool respectDeltaTime)
        {
            if (ReferenceEquals(null, smpteOffsetEvent))
            {
                return(false);
            }

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

            return(base.Equals(smpteOffsetEvent, respectDeltaTime) &&
                   Hours == smpteOffsetEvent.Hours &&
                   Minutes == smpteOffsetEvent.Minutes &&
                   Seconds == smpteOffsetEvent.Seconds &&
                   Frames == smpteOffsetEvent.Frames &&
                   SubFrames == smpteOffsetEvent.SubFrames);
        }
예제 #3
0
 /// <summary>
 /// Determines whether the specified event is equal to the current one.
 /// </summary>
 /// <param name="smpteOffsetEvent">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(SmpteOffsetEvent smpteOffsetEvent)
 {
     return(Equals(smpteOffsetEvent, true));
 }