private void Read(ReadStyle propertiesStyle) { // Look for an ID3v1 tag long id3v1Location = FindId3v1(); if (id3v1Location >= 0) { id3v1Tag = new Id3v1Tag(this, id3v1Location); } // Look for an APE tag long apeLocation = FindApe(id3v1Location != 0); if (apeLocation >= 0) { apeTag = new ApeTag(this, apeLocation); } // Look for an ID3v2 tag long id3v2Location = FindId3v2(); if (id3v2Location >= 0) { id3v2Tag = new Id3v2Tag(this, id3v2Location); } tag.SetTags(apeTag, id3v2Tag, id3v1Tag); FindMpcTag(TagTypes.Ape, true); // Look for MPC metadata Seek((id3v2Location >= 0) ? (id3v2Location + id3v2Tag.Header.CompleteTagSize) : 0); if (propertiesStyle != ReadStyle.None) { properties = new MpcProperties(ReadBlock((int)MpcProperties.HeaderSize), Length - Tell - apeTag.Footer.CompleteTagSize); } }
private void Read(ReadStyle propertiesStyle) { // Look for an ID3v1 tag long id3v1Location = FindId3v1(); if (id3v1Location >= 0) { id3v1Tag = new Id3v1Tag(this, id3v1Location); } // Look for an APE tag long apeLocation = FindApe(id3v1Location != 0); if (apeLocation >= 0) apeTag = new ApeTag(this, apeLocation); // Look for an ID3v2 tag long id3v2Location = FindId3v2(); if (id3v2Location >= 0) id3v2Tag = new Id3v2Tag(this, id3v2Location); tag.SetTags(apeTag, id3v2Tag, id3v1Tag); FindMpcTag(TagTypes.Ape, true); // Look for MPC metadata Seek((id3v2Location >= 0) ? (id3v2Location + id3v2Tag.Header.CompleteTagSize) : 0); if (propertiesStyle != ReadStyle.None) properties = new MpcProperties(ReadBlock((int)MpcProperties.HeaderSize), Length - Tell - apeTag.Footer.CompleteTagSize); }