Ejemplo n.º 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]);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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++;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="junkRegion"></param>
 public FoundJunkRegionEventArgs(JunkRegion junkRegion)
 {
     this.junkRegion = junkRegion;
 }
Ejemplo n.º 5
0
 public void FoundJunkRegionEventHandler(FoundJunkRegionEventArgs e)
 {
     previousJunkRegion = e.Region;
 }