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++)
            {
                TempoEntry ev = new TempoEntry();
                ev.Start = ar.ReadSingle();
                ev.End   = ar.ReadSingle();
                ev.BPM   = ar.ReadSingle();

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

            int count = ar.ReadInt32();

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

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

                entry.Start = ar.ReadSingle();
                entry.End   = ar.ReadSingle();
                entry.BPM   = ar.ReadSingle();

                Entries.Add(entry);
            }
        }