Esempio n. 1
0
            public void ReadFile(ArraySegment <byte> data, bool NewVersion)
            {
                var offs = data.Offset;

                Name       = IDX.ReadCString(data, 16);
                Offset     = BitConverter.ToInt32(data.Array, offs + 16);
                Size       = BitConverter.ToInt32(data.Array, offs + 20);
                SampleRate = BitConverter.ToInt32(data.Array, offs + 24);
                Flags      = (SampleFlags)BitConverter.ToInt32(data.Array, offs + 28);
                if (NewVersion)
                {
                    ChunkSize = BitConverter.ToInt32(data.Array, offs + 32);
                }
            }
Esempio n. 2
0
            public bool ReadFile(BinaryReader r)
            {
                String Identifier = IDX.ReadCString(r, 4);

                if (!Identifier.Equals("GABA"))
                {
                    return(false);
                }

                Version = r.ReadInt32();

                SampleCount = r.ReadInt32();

                return(true);
            }