Пример #1
0
        public MP3FileReader(Stream stream)
        {
            CSCore.Tags.ID3.ID3v2.SkipTag(stream);
            dataStartIndex = stream.Position;

            var id3v1Tag = ID3v1.FromStream(stream);
            if (id3v1Tag != null)
            {
                dataLength = stream.Length - dataStartIndex - 128; //128 = id3v1 length
            }
            else
            {
                dataLength = stream.Length - dataStartIndex;
            }

            stream.Position = dataStartIndex;

            dataStream = new MP3Stream(stream, true, id3v1Tag != null ? 128 : 0);
        }
Пример #2
0
        public MP3FileReader(Stream stream)
        {
            CSCore.Tags.ID3.ID3v2.SkipTag(stream);
            dataStartIndex = stream.Position;

            var id3v1Tag = ID3v1.FromStream(stream);

            if (id3v1Tag != null)
            {
                dataLength = stream.Length - dataStartIndex - 128; //128 = id3v1 length
            }
            else
            {
                dataLength = stream.Length - dataStartIndex;
            }

            stream.Position = dataStartIndex;

            dataStream = new MP3Stream(stream, true, id3v1Tag != null ? 128 : 0);
        }