RocksmithToolkitLib.Sng2014HSL.BpmSection.read C# (CSharp) Method

read() public method

public read ( EndianBinaryReader r ) : void
r EndianBinaryReader
return void
        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);
            }
        }

Usage Example

Example #1
0
 public void read(EndianBinaryReader r)
 {
     BPMs              = new BpmSection(); BPMs.read(r);
     Phrases           = new PhraseSection(); Phrases.read(r);
     Chords            = new ChordSection(); Chords.read(r);
     ChordNotes        = new ChordNotesSection(); ChordNotes.read(r);
     Vocals            = new VocalSection(); Vocals.read(r);
     SymbolsHeader     = new SymbolsHeaderSection(); SymbolsHeader.read(r);
     SymbolsTexture    = new SymbolsTextureSection(); SymbolsTexture.read(r);
     SymbolsDefinition = new SymbolDefinitionSection(); SymbolsDefinition.read(r);
     PhraseIterations  = new PhraseIterationSection(); PhraseIterations.read(r);
     PhraseExtraInfo   = new PhraseExtraInfoByLevelSection(); PhraseExtraInfo.read(r);
     NLD          = new NLinkedDifficultySection(); NLD.read(r);
     Actions      = new ActionSection(); Actions.read(r);
     Events       = new EventSection(); Events.read(r);
     Tones        = new ToneSection(); Tones.read(r);
     DNAs         = new DnaSection(); DNAs.read(r);
     Sections     = new SectionSection(); Sections.read(r);
     Arrangements = new ArrangementSection(); Arrangements.read(r);
     Metadata     = new Metadata(); Metadata.read(r);
 }
All Usage Examples Of RocksmithToolkitLib.Sng2014HSL.BpmSection::read
BpmSection