public void ExtractToFile(string pathtoafc = "",string name = "",bool askSaveLoc = true)
{
if (FileName == "")
return;
if (FileName == null)
{
ExtractWav(pathtoafc, name, askSaveLoc);
}
else if (pathtoafc != "")
{
if (File.Exists(pathtoafc + FileName + ".afc"))
ExtractWav(pathtoafc + FileName + ".afc", name, askSaveLoc);
else
{
OpenFileDialog d = new OpenFileDialog();
d.Filter = FileName + ".afc|" + FileName + ".afc";
if (d.ShowDialog() == DialogResult.OK)
ExtractWav(d.FileName, name, askSaveLoc);
}
}
else
{
OpenFileDialog d = new OpenFileDialog();
d.Filter = FileName + ".afc|" + FileName + ".afc";
if (d.ShowDialog() == DialogResult.OK)
ExtractWav(d.FileName, name, askSaveLoc);
}
}