void SerializeStringType(IO.EndianStream s, AKBKHashHeader hdr, AkSoundBank bank)
 {
     switch (hdr.Type)
     {
     case AkSoundBankStringMappingBase.StringType.OldEvents:
         SerializeEntries(s, ref Events);
         break;
     }
 }
        void SerializeStringType(IO.EndianStream s, AKBKHashHeader hdr, AkSoundBank bank)
        {
            Contract.Assert(hdr.Type == AkSoundBankStringMappingBase.StringType.Bank);

            uint   bank_id = uint.MaxValue;
            string str     = null;

            s.Stream(ref bank_id);
            s.Stream(ref str, kStringEncoding);

            bank.MapIdToName(bank_id, str);
        }
        public override void Serialize(IO.EndianStream s, AkSubchunkHeader header)
        {
            Contract.Assert(s.IsReading);

            var bank = s.Owner as AkSoundBank;

            long eos = EndOfStream(s, header);

            while (s.BaseStream.Position != eos)
            {
                AKBKHashHeader hdr = new AKBKHashHeader();
                hdr.Serialize(s);

                SerializeStringType(s, hdr, bank);
            }
        }
 protected static long EndOfStream(IO.EndianStream s, AKBKHashHeader header)
 {
     return(s.BaseStream.Position + header.Size);
 }