public void read(EndianBinaryReader r)
 {
     Count = r.ReadInt32();
     BPMs  = new Bpm[Count]; for (int i = 0; i < Count; i++)
     {
         var obj = new Bpm(); obj.read(r); BPMs[i] = obj;
     }
 }
Esempio n. 2
0
 public void read(BinaryReader r)
 {
     this.Count = r.ReadInt32();
     this.BPMs  = new Bpm[this.Count]; for (int i = 0; i < this.Count; i++)
     {
         Bpm obj = new Bpm(); obj.read(r); this.BPMs[i] = obj;
     }
 }
Esempio n. 3
0
 public void read(EndianBinaryReader r)
 {
     try
     {
         Count = r.ReadInt32();
         BPMs  = new Bpm[Count];
         for (int i = 0; i < Count; i++)
         {
             var obj = new Bpm();
             obj.read(r);
             BPMs[i] = obj;
         }
     }
     catch (Exception ex)
     {
         // incomplete song information may cause exceptions during conversion
         // such as, "End of Stream reached with 4 bytes left to read"
         throw new Exception("Corrupt CDLC ... Regenerating or Converting the original with Creator GUI may fix it." + Environment.NewLine + "Make sure the song information is complete and correct, including Song Year and Avg Tempo information. (HINT)" + Environment.NewLine + ex.Message + Environment.NewLine + Environment.NewLine);
     }
 }
 private void parseEbeats(Song2014 xml, Sng2014File sng)
 {
     sng.BPMs = new BpmSection();
     sng.BPMs.Count = xml.Ebeats.Length;
     sng.BPMs.BPMs = new Bpm[sng.BPMs.Count];
     Int16 measure = 0;
     Int16 beat = 0;
     for (int i = 0; i < sng.BPMs.Count; i++)
     {
         var ebeat = xml.Ebeats[i];
         var bpm = new Bpm();
         bpm.Time = ebeat.Time;
         if (ebeat.Measure >= 0)
         {
             measure = ebeat.Measure;
             beat = 0;
         }
         else
         {
             beat++;
         }
         bpm.Measure = measure;
         bpm.Beat = beat;
         bpm.PhraseIteration = getPhraseIterationId(xml, bpm.Time, true);
         if (beat == 0)
         {
             bpm.Mask |= 1;
             if (measure % 2 == 0)
                 bpm.Mask |= 2;
         }
         sng.BPMs.BPMs[i] = bpm;
     }
 }
 public void read(EndianBinaryReader r)
 {
     //if (r.BaseStream.Length >0)
     //{
         Count = r.ReadInt32();
         BPMs = new Bpm[Count]; for (int i = 0; i < Count; i++) { var obj = new Bpm(); obj.read(r); BPMs[i] = obj; }
     //}
 }
		public void read(EndianBinaryReader r) {
			Count = r.ReadInt32();
			BPMs = new Bpm[Count]; for (int i = 0; i < Count; i++) { var obj = new Bpm(); obj.read(r); BPMs[i] = obj; }
		}
        public void read(EndianBinaryReader r)
        {
            try
            {
                Count = r.ReadInt32();
                BPMs = new Bpm[Count];
                for (int i = 0; i < Count; i++)
                {
                    var obj = new Bpm();
                    obj.read(r);
                    BPMs[i] = obj;
                }
            }
            catch (Exception ex)
            {
                // incomplete song information causes exceptions during conversion
                // such as, "End of Stream reached with 4 bytes left to read"

                throw new Exception("Corrupt CDLC ... Regenerating with Creator GUI may fix it." + Environment.NewLine +
                    "Make sure the song information is complete and correct, including Song Year and Avg Tempo information. (HINT)" + Environment.NewLine +
                    ex.Message + Environment.NewLine + Environment.NewLine);
            }
        }
 public void read(BinaryReader r)
 {
     this.Count = r.ReadInt32();
     this.BPMs = new Bpm[this.Count]; for (int i=0; i<this.Count; i++) { Bpm obj = new Bpm(); obj.read(r); this.BPMs[i] = obj; }
 }