private void openCompressedFileToolStripMenuItem_Click(object sender, EventArgs e) { { isCompress = 1; OpenFileDialog openFile = new OpenFileDialog(); openFile.Filter = "Wav Files|*.wav"; openFile.Title = "Select a File"; isRecording = 0; if (openFile.ShowDialog() == DialogResult.OK) { lft = null; rite = null; wave = null; wave = new WaveReader(); wave.openWav(openFile.FileName, out lft, out rite); this.Invoke(freqGraph, new object[] { lft }); if (lft.Length < 500) { offset = 0; dist = lft.Length; } else { offset = lft.Length / 2 - 250; dist = 500; } windowing(); } } isCompress = 0; }
/// <summary> /// Opens the dll recorder, resets data containers and wave reader /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void openRecorderToolStripMenuItem_Click(object sender, EventArgs e) { lft = null; rite = null; wave = null; wave = new WaveReader(); Recorder.start(); }