public void FoundMp3FrameEventHandler(FoundMp3FrameEventArgs e) { if (e.Region.IsTruncated) { if (OnValidationFailure != null) { OnValidationFailure( new ValidationFailureEventArgs( new ValidationFailure( "broken frame"))); } } }
public void FoundMp3FrameEventHandler(FoundMp3FrameEventArgs e) { if (mp3FrameCount > 0 && shouldCalculateCrc) { if (previousJunkRegion != null) { // The previous junk region is part of the music crc calcCrc.AddToCrc(previousJunkRegion.Bytes); } calcCrc.AddToCrc(e.Region.Bytes); } previousJunkRegion = null; mp3FrameCount++; }
public void FoundMp3FrameEventHandler(FoundMp3FrameEventArgs e) { if (visitCount++ == 0) { LameHeader header = new LameHeader(e.Region); if (header.IsValid) { if (OnFoundLameHeader != null) { OnFoundLameHeader( new FoundLameHeaderEventArgs(header)); } } else { if (OnMissedLameHeader != null) { OnMissedLameHeader( new MissedLameHeaderEventArgs()); } } } }