Exemplo n.º 1
0
        protected override void ImportData(AwesomeReader ar)
        {
            Title       = ar.ReadInt64();
            Artist      = ar.ReadInt64();
            Description = ar.ReadInt64();
            Album       = ar.ReadInt64();
            TexturePath = ar.ReadInt64();
            LegendTag   = ar.ReadInt64();
            EraTag      = ar.ReadInt64();

            Year            = ar.ReadInt32();
            GuitarIntensity = ar.ReadSingle();
            BassIntensity   = ar.ReadSingle();
            VoxIntensity    = ar.ReadSingle();

            // Reads technique tags.
            int  count            = ar.ReadInt32();
            int  offset           = ar.ReadInt32();
            long previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                TechniqueTags.Add(ar.ReadInt64());
            }
            ar.BaseStream.Position = previousPosition;

            // Reads genre tags.
            count            = ar.ReadInt32();
            offset           = ar.ReadInt32();
            previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                GenreTags.Add(ar.ReadInt64());
            }
            ar.BaseStream.Position = previousPosition;

            // Reads labels.
            count            = ar.ReadInt32();
            offset           = ar.ReadInt32();
            previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                Labels.Add(ar.ReadInt64());
            }
            ar.BaseStream.Position = previousPosition;

            SongLength = ar.ReadSingle();
            ar.ReadInt32(); // Should be zero

            PreviewPath = ar.ReadInt64();
            VideoPath   = ar.ReadInt64();
            ar.ReadInt64(); // Should be zero

            // Reads instrument paths.
            count            = ar.ReadInt32();
            offset           = ar.ReadInt32();
            previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                InstrumentPaths.Add(ar.ReadInt64());
            }

            // Reads audio paths
            ar.BaseStream.Position = previousPosition;

            BackingAudioPath = ar.ReadInt64();
            BassAudioPath    = ar.ReadInt64();
            DrumsAudioPath   = ar.ReadInt64();
            Guitar1AudioPath = ar.ReadInt64();
            Guitar2AudioPath = ar.ReadInt64();
            VoxAudioPath     = ar.ReadInt64();
        }
Exemplo n.º 2
0
        internal override void ReadData(AwesomeReader ar)
        {
            // Clears tag/path lists
            MetadataTags.Clear();
            GenreTags.Clear();
            Labels.Clear();
            InstrumentPaths.Clear();

            // 184 bytes
            Title       = ar.ReadUInt64();
            Artist      = ar.ReadUInt64();
            Description = ar.ReadUInt64();
            Album       = ar.ReadUInt64();
            TexturePath = ar.ReadUInt64();
            LegendTag   = ar.ReadUInt64();
            EraTag      = ar.ReadUInt64();

            Year            = ar.ReadInt32();
            GuitarIntensity = ar.ReadSingle();
            BassIntensity   = ar.ReadSingle();
            VoxIntensity    = ar.ReadSingle();

            // Reads metadata tags
            int  count            = ar.ReadInt32();
            int  offset           = ar.ReadInt32();
            long previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                MetadataTags.Add(ar.ReadUInt64());
            }
            ar.BaseStream.Position = previousPosition;

            // Reads genre tags
            count            = ar.ReadInt32();
            offset           = ar.ReadInt32();
            previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                GenreTags.Add(ar.ReadUInt64());
            }
            ar.BaseStream.Position = previousPosition;

            // Reads labels
            count            = ar.ReadInt32();
            offset           = ar.ReadInt32();
            previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                Labels.Add(ar.ReadUInt64());
            }
            ar.BaseStream.Position = previousPosition;

            SongLength              = ar.ReadSingle();
            ar.BaseStream.Position += 4; // Should be zero

            PreviewPath             = ar.ReadUInt64();
            VideoPath               = ar.ReadUInt64();
            ar.BaseStream.Position += 8; // Should be zero

            // Reads instrument paths.
            count            = ar.ReadInt32();
            offset           = ar.ReadInt32();
            previousPosition = ar.BaseStream.Position;

            ar.BaseStream.Position += offset - 4;
            for (int i = 0; i < count; i++)
            {
                InstrumentPaths.Add(ar.ReadUInt64());
            }
            ar.BaseStream.Position = previousPosition;

            // Reads audio paths
            BackingAudioPath      = ar.ReadUInt64();
            BassAudioPath         = ar.ReadUInt64();
            DrumsAudioPath        = ar.ReadUInt64();
            LeadGuitarAudioPath   = ar.ReadUInt64();
            RhythmGuitarAudioPath = ar.ReadUInt64();
            VoxAudioPath          = ar.ReadUInt64();
        }