We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hmm ... maybe there should be another approach to achieve this. in this code reader.CurrentTime has fixed value .
reader.CurrentTime
public static byte[] CropMp3(Mp3CropInfo_DTO cropInfo, bool includeId3Tags = false) { using (var source = new MemoryStream(cropInfo.Mp3File)) using (var reader = new Mp3FileReader(source)) using (var writer = new MemoryStream()) { //Extract ID3 tags if (reader.Id3v2Tag != null && includeId3Tags) { writer.Write(reader.Id3v2Tag.RawData, 0, reader.Id3v2Tag.RawData.Length); } //Optional :/ //reader.CurrentTime = cropInfo.StartTime; Mp3Frame frame; while (reader.CurrentTime.CompareTo(cropInfo.EndTime) <= 0 && (frame = reader.ReadNextFrame()) != null) { if (reader.CurrentTime.CompareTo(cropInfo.StartTime) >= 0) { writer.Write(frame.RawData, 0, frame.RawData.Length); } } writer.Flush(); return writer.ToArray(); } }
The text was updated successfully, but these errors were encountered:
42ebd73
thanks for the reminder, have been meaning to sort that out for a while
Sorry, something went wrong.
@markheath could you publish a new NuGet with this fix included?
yes, have just pushed 1.8.1
No branches or pull requests
hmm ... maybe there should be another approach to achieve this.
in this code
reader.CurrentTime
has fixed value .The text was updated successfully, but these errors were encountered: