public RiffChunkListWave(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; cue_Chunk = ( RiffChunkCue_ )GetChunk(RiffChunkCue_.ID); dataChunk = ( RiffChunkData )GetChunk(RiffChunkData.ID); fmt_Chunk = ( RiffChunkFmt_ )GetChunk(RiffChunkFmt_.ID); smplChunk = ( RiffChunkSmpl )GetChunk(RiffChunkSmpl.ID); }
public WaveformDls(RiffChunkListWave aWaveList, string aName) : base() { RiffChunkFmt_ fmt_Chunk = aWaveList.fmt_Chunk; RiffChunkData dataChunk = aWaveList.dataChunk; int position = ( int )dataChunk.position; int length = ( int )dataChunk.size; int channels = fmt_Chunk.channles; int sampleRate = ( int )fmt_Chunk.samplesPerSec; int sampleBits = ( int )fmt_Chunk.bitsPerSample; int samples = length / (sampleBits / 8) / channels; format = new FormatWaweform(channels, samples, sampleRate, sampleBits); data = new WaveformData(format, null, aName, position); }