Exemple #1
0
        internal override void ReadData(AwesomeReader ar)
        {
            Events.Clear();
            ar.BaseStream.Position += 8; // Skips constants

            int count = ar.ReadInt32();

            ar.BaseStream.Position += 4;

            for (int i = 0; i < count; i++)
            {
                TimeSignatureEntry ev = new TimeSignatureEntry();
                ev.Start   = ar.ReadSingle();
                ev.End     = ar.ReadSingle();
                ev.Beat    = ar.ReadInt32();
                ev.Measure = ar.ReadInt32();

                Events.Add(ev);
            }
        }
Exemple #2
0
        protected override void ImportData(AwesomeReader ar)
        {
            ar.ReadInt32(); // Always 0
            ar.ReadInt32(); // Size of each TimeEntry (16 bytes)

            int count = ar.ReadInt32();

            ar.ReadInt32(); // Offset to entries (Always 4)

            for (int i = 0; i < count; i++)
            {
                // Reads entry (16 bytes)
                TimeSignatureEntry entry = new TimeSignatureEntry();

                entry.Start   = ar.ReadSingle();
                entry.End     = ar.ReadSingle();
                entry.Beat    = ar.ReadInt32();
                entry.Measure = ar.ReadInt32();

                Entries.Add(entry);
            }
        }