예제 #1
0
 void RoQReset()
 {
     iFile.Seek(0, FS_SEEK.SET);
     iFile.Read(file, 16);
     RoQ_init();
     status = CinStatus.FMV_LOOPED;
 }
예제 #2
0
        // Resets the internal mck pointer so reading starts from the beginning of the file again
        public unsafe int ResetFile()
        {
            if (mbIsReadingFromMemory)
            {
                mpbDataCur = 0;
            }
            else
            {
                if (mhmmio == null)
                {
                    return(-1);
                }

                // Seek to the data
                if (mhmmio.Seek(mckRiff.dwDataOffset + sizeof(int), FS_SEEK.SET) == -1)
                {
                    return(-1);
                }

                // Search the input file for for the 'fmt ' chunk.
                mck.ckid = 0;
                do
                {
                    byte ioin;
                    if (mhmmio.Read(&ioin, 1) == 0)
                    {
                        return(-1);
                    }
                    mck.ckid = (mck.ckid >> 8) | (ioin << 24);
                } while (mck.ckid != SoundSystemLocal.mmioFOURCC('d', 'a', 't', 'a'));

                uint mck_cksize;
                mhmmio.Read((byte *)&mck_cksize, 4);
                Debug.Assert(!isOgg);
                mck.cksize = LittleUInt(mck_cksize);
                mseekBase  = mhmmio.Tell;
            }

            return(0);
        }