/// <summary> /// Add a filename to our list of files for processing /// </summary> /// <param name="filename">The completely pathed filename of the file to read</param> private void AddAudioFilename(String filename) { WAVFormat format = WAVFile.GetAudioFormat(filename); if (format.NumChannels > 1) { //TODO: Pop up something here return; } if (format.BitsPerSample != 8 && format.BitsPerSample != 16) { Console.Out.WriteLine(format.BitsPerSample); return; } if (!WAVFile.IsWaveFile(filename)) { //TODO: Pop up a window to alert the user that an invalid file was specified return; } Downsampler.WavetableRef wavref = new WavetableRef(); wavref.filename = Path.GetFileName(filename); wavref.filedir = Path.GetDirectoryName(filename); wavref.filepath = filename; mSoundFiles.Add(wavref); fileGridView.Rows.Add(1); int rowNum = fileGridView.Rows.Count - 1; fileGridView.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; fileGridView.Rows[rowNum].Cells[0].Value = wavref.filename; fileGridView.Rows[rowNum].Cells[1].Value = "Copy (As Array)"; fileGridView.Rows[rowNum].Cells[2].Value = "Remove"; }