public FactChunk(MappedFile f, int sampleLength) : base(f, "fact") { dwSampleLength = AddPtr <Int32Ptr>(f); SampleLength = sampleLength; }
public FmtChunk(MappedFile f, WaveFormat _audioFormat) : base(f, "fmt ") { // Structure wFormatTag = AddPtr <Int16Ptr>(f); nChannels = AddPtr <Int16Ptr>(f); nSamplesPerSec = AddPtr <Int32Ptr>(f); nAvgBytesPerSec = AddPtr <Int32Ptr>(f); nBlockAlign = AddPtr <Int16Ptr>(f); wBitsPerSample = AddPtr <Int16Ptr>(f); if (_audioFormat != WaveFormat.PCM) { cbSize = AddPtr <Int16Ptr>(f); if (_audioFormat == WaveFormat.EXTENSIBLE) { wValidBitsPerSample = AddPtr <Int16Ptr>(f); dwChannelMask = AddPtr <Int32Ptr>(f); gidSubFormat = AddPtr <ByteArrayPtr>(new ByteArrayPtr(f, 16)); cbSize = new Int16Ptr(f); } } // Initialization FormatTag = _audioFormat; }
public ChunkHeader(MappedFile f, string _id) { id = new FourCCPtr(f); id.Write(_id); blen = new Int32Ptr(f); blen.Write(0); body = new List <MappedPtr>(); chunks = new List <ChunkHeader>(); }