Exemple #1
0
 public bool Open(Stream fs)
 {
     CBMDContext = new CBMDContext();
     var ret = CBMDContext.Open(fs);
     if (!ret)
     {
         errorMessage = CBMDContext.GetErrorMessage();
         return false;
     }
     if (fs.Position % 0x20 != 0)
         fs.Seek(0x20 - (fs.Position%0x20), SeekOrigin.Current); //complete alignment to the next 0x20
     CWAVContext = new CWAVContext();
     ret = CWAVContext.Open(fs);
     if (!ret)
     {
         errorMessage = CWAVContext.GetErrorMessage();
         return false;
     }
     return true;
 }
Exemple #2
0
        public bool Open(Stream fs)
        {
            CBMDContext = new CBMDContext();
            var ret = CBMDContext.Open(fs);

            if (!ret)
            {
                errorMessage = CBMDContext.GetErrorMessage();
                return(false);
            }
            if (fs.Position % 0x20 != 0)
            {
                fs.Seek(0x20 - (fs.Position % 0x20), SeekOrigin.Current); //complete alignment to the next 0x20
            }
            CWAVContext = new CWAVContext();
            ret         = CWAVContext.Open(fs);
            if (!ret)
            {
                errorMessage = CWAVContext.GetErrorMessage();
                return(false);
            }
            return(true);
        }