public SampleHeader(BinaryReader reader) { sampleName = IOHelper.Read8BitString(reader, 20); start = reader.ReadUInt32(); end = reader.ReadUInt32(); startLoop = reader.ReadUInt32(); endLoop = reader.ReadUInt32(); sampleRate = reader.ReadUInt32(); originalPitch = reader.ReadByte(); pitchCorrection = reader.ReadSByte(); sampleLink = reader.ReadUInt16(); soundFontSampleLink = (SFSampleLink)reader.ReadUInt16(); }
public SampleHeader(IReadable input) { Name = input.Read8BitStringLength(20); Start = input.ReadInt32LE(); End = input.ReadInt32LE(); StartLoop = input.ReadInt32LE(); EndLoop = input.ReadInt32LE(); SampleRate = input.ReadInt32LE(); RootKey = (byte)input.ReadByte(); Tune = Platform.Platform.ToInt16(input.ReadByte()); SampleLink = input.ReadUInt16LE(); SoundFontSampleLink = (SFSampleLink)input.ReadUInt16LE(); }
public SampleHeader(IReadable input) { Name = input.Read8BitStringLength(20); Start = input.ReadInt32LE(); End = input.ReadInt32LE(); StartLoop = input.ReadInt32LE(); EndLoop = input.ReadInt32LE(); SampleRate = input.ReadInt32LE(); RootKey = (byte) input.ReadByte(); Tune = TypeUtils.ToInt16(input.ReadByte()); SampleLink = input.ReadUInt16LE(); SoundFontSampleLink = (SFSampleLink) input.ReadUInt16LE(); }