示例#1
0
 public void Constructor_CopyInputTest()
 {
     byte[] b = new byte[] { 1, 1 };
     JunkRegion jr = new JunkRegion(b);
     b[1] = 2;
     Assert.AreEqual(1, jr.Bytes[1]);
 }
示例#2
0
 public void Bytes_NotWritableTest()
 {
     JunkRegion jr = new JunkRegion(new byte[10]);
     IList<byte> bytes = jr.Bytes;
     Assert.AreEqual(10, bytes.Count);
     // Modify junk region data
     bytes[9] = 0xFF;
 }
示例#3
0
 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++;
 }
示例#4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="junkRegion"></param>
 public FoundJunkRegionEventArgs(JunkRegion junkRegion)
 {
     this.junkRegion = junkRegion;
 }
示例#5
0
 public void FoundJunkRegionEventHandler(FoundJunkRegionEventArgs e)
 {
     previousJunkRegion = e.Region;
 }