Beispiel #1
0
        static public WaveBankRegion Read(Stream source)
        {
            BinaryReader   reader = new BinaryReader(source);
            WaveBankRegion result = new WaveBankRegion();

            result.Offset = reader.ReadInt32();
            result.Length = reader.ReadInt32();
            return(result);
        }
Beispiel #2
0
        static public WaveBankEntry Read(Stream source)
        {
            BinaryReader  reader = new BinaryReader(source);
            WaveBankEntry result = new WaveBankEntry();

            result.Value      = reader.ReadInt32();
            result.Format     = WaveBankMiniWaveFormat.Read(source);
            result.PlayRegion = WaveBankRegion.Read(source);
            result.LoopRegion = WaveBankSampleRegion.Read(source);
            return(result);
        }
Beispiel #3
0
        static public WaveBankHeader Read(Stream source)
        {
            BinaryReader   reader = new BinaryReader(source);
            WaveBankHeader result = new WaveBankHeader();

            result.Signature     = reader.ReadInt32();
            result.Version       = reader.ReadInt32();
            result.HeaderVersion = reader.ReadInt32();
            result.Segments      = new WaveBankRegion[(int)WaveBankSegIdx.Count];
            for (int i = 0; i < result.Segments.Length; i++)
            {
                result.Segments[i] = WaveBankRegion.Read(source);
            }
            return(result);
        }
Beispiel #4
0
 public static WaveBankRegion Read(Stream source)
 {
     BinaryReader reader = new BinaryReader(source);
     WaveBankRegion result = new WaveBankRegion();
     result.Offset = reader.ReadInt32();
     result.Length = reader.ReadInt32();
     return result;
 }