try {
mergedCivFiles = audioMerger.mergeCivFiles(audioTarget, audioSource);
Iterator iterM = mergedCivFiles.iterator();
while (iterM.hasNext())
{
CivFile merged = (CivFile)iterM.next();
try
{
BufferedWriter writeTarget = new BufferedWriter(new FileWriter(merged.getFile()));
merged.writeFile(writeTarget);
writeTarget.close();
setLogText("Merge file written successfully " + merged.getFile().getPath());
} catch (Exception e)
{
setErrorText("Merge failed " + merged.getFile().getPath());
}
}
} catch (Exception e)
{
setErrorText("Error merging files, abort");