Esempio n. 1
0
 public WaveFile(uint sampleRate, BitDepth bitDepth, ushort channels, Stream file)
 {
     _format = new FormatChunk(sampleRate, channels, (ushort)bitDepth, file, 12);
     _data   = new DataChunk(file, 12 + _format.Size, _format);
     _header = new HeaderChunk(file, _format, _data, 0);
     _file   = file;
 }
Esempio n. 2
0
 public HeaderChunk(FormatChunk format, DataChunk data)
     : base()
 {
     this._RIFFType = new byte[4];
     this._format   = format;
     this._data     = data;
 }
Esempio n. 3
0
 public DataChunk(Stream file, uint dataOffset, FormatChunk format)
     : base("data", 0, dataOffset, file)
 {
     this._format      = format;
     this._chunkOffset = dataOffset;
     _dataOffset       = (uint)(this._chunkOffset +
                                this._chunkID.Length +
                                this._chunkDataSize.Length);
 }
Esempio n. 4
0
 public WaveFile()
 {
     _format = new FormatChunk();
     _data   = new DataChunk(_format);
     _header = new HeaderChunk(_format, _data);
 }
Esempio n. 5
0
 public HeaderChunk(Stream file, FormatChunk format, DataChunk data, uint offSet)
     : base("RIFF", 0, offSet, file)
 {
     this._format = format;
     this._data   = data;
 }
Esempio n. 6
0
 public DataChunk(FormatChunk format)
     : base()
 {
     this._format     = format;
     this._dataOffset = (uint)(this._chunkOffset + this._chunkID.Length + this._chunkDataSize.Length);
 }