Exemple #1
0
 public static void WriteWaveformFile(string path, WaveformBase waveform)
 {
     using (var waveFormWriter = new WaveformFileWaveformWriter(path))
     {
         waveFormWriter.Write(waveform);
     }
 }
        protected override void When()
        {
            _frames = new WaveForm16BitFrame[]
            {
                new WaveForm16BitFrame(new [] { (short)1, (short)2 }),
                new WaveForm16BitFrame(new [] { (short)3, (short)4 }),
            };

            var format   = new WaveformFormat(_channelsCount, _samplesPerSecond, _bitsPerSample);
            var waveForm = new MemoryWaveform(format, _frames);

            using (var waveFormWriter = new WaveformFileWaveformWriter(_filePath))
            {
                waveFormWriter.Write(waveForm);
            }
        }