Пример #1
0
        internal WaveSampleChunk(EndianBinaryReader reader) : base("wsmp", reader)
        {
            long endOffset = GetEndOffset(reader);
            uint byteSize  = reader.ReadUInt32();

            if (byteSize != 20)
            {
                throw new InvalidDataException();
            }
            UnityNote = reader.ReadUInt16();
            FineTune  = reader.ReadInt16();
            Gain      = reader.ReadInt32();
            Options   = reader.ReadEnum <WaveSampleOptions>();
            if (reader.ReadUInt32() == 1)
            {
                Loop = new WaveSampleLoop(reader);
            }
            EatRemainingBytes(reader, endOffset);
        }
Пример #2
0
        }                                        // Combining "SampleLoops" and the loop list

        public WaveSampleChunk() : base("wsmp")
        {
            UnityNote = 60;
            Loop      = null;
        }