private void ReadDataWave() { System.Windows.Forms.OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "All Supported Files (*.wav)|*.wav"; if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) { return; } FileName = openFileDialog.FileName; WavFile file = new WavFile(FileName); //входной файл WavData orig = file.ReadData(); Processed = new WavData(orig.Header, orig.Data.Length); SelectedData.Clear(); Line.Points.Clear(); using (orig) { int c = orig.GetSamplesCount(); int x = 0; for (int i = 0; i < c; i++) { float y = orig.ReadNextSample(); //читаем следующий семпл Line.Points.Add(new DataPoint(x++, y)); } Model.InvalidatePlot(true); } }