Exemple #1
0
        public void Read(BinaryReader reader)
        {
            if (Shared.Swap(reader.ReadUInt32()) != smplId)
            {
                throw new Exception("Wrong chunk ID!");
            }

            smplSize      = reader.ReadUInt32();
            manufacturer  = reader.ReadUInt32();
            product       = reader.ReadUInt32();
            samplePeriod  = reader.ReadUInt32();
            unityNote     = reader.ReadUInt32();
            pitchFraction = reader.ReadUInt32();
            smpteFormat   = reader.ReadUInt32();
            smpteOffset   = reader.ReadUInt32();
            numLoops      = reader.ReadUInt32();
            samplerData   = reader.ReadUInt32();

            for (int i = 0; i < numLoops; i++)
            {
                WaveSmplLoop tempLoop = new WaveSmplLoop();
                tempLoop.Read(reader);

                smplLoops.Add(tempLoop);
            }
        }
Exemple #2
0
        public void Read(BinaryReader reader)
        {
            if (Shared.Swap(reader.ReadUInt32()) != smplId)
                throw new Exception("Wrong chunk ID!");

            smplSize = reader.ReadUInt32();
            manufacturer = reader.ReadUInt32();
            product = reader.ReadUInt32();
            samplePeriod = reader.ReadUInt32();
            unityNote = reader.ReadUInt32();
            pitchFraction = reader.ReadUInt32();
            smpteFormat = reader.ReadUInt32();
            smpteOffset = reader.ReadUInt32();
            numLoops = reader.ReadUInt32();
            samplerData = reader.ReadUInt32();

            for (int i = 0; i < numLoops; i++)
            {
                WaveSmplLoop tempLoop = new WaveSmplLoop();
                tempLoop.Read(reader);

                smplLoops.Add(tempLoop);
            }
        }