private void FileFailed(string file, Exception exception)
        {
            var soundFile = SoundFiles.First(x => x.FullName == file);

            soundFile.ThrownException = exception.ToString();
            soundFile.Status          = Status.Failed;
        }
        public async void Start()
        {
            foreach (var file in SoundFiles)
            {
                file.ThrownException = null;
                if (file.IsSelected)
                {
                    file.Status = Status.Pending;
                }
                else
                {
                    file.Status = Status.Skipped;
                }
            }

            IsRunning = true;
            var overmodulatedFiles = await AudioFileManager.CheckForOvermodulation(
                ProgressChanged,
                BaseVolume,
                SoundFiles.Where(x => x.IsSelected).Select(x => x.FullName),
                SoundFiles.Where(x => x.IsSelectedBaseVolumeFile).Select(x => x.FullName)
                );

            foreach (var file in overmodulatedFiles)
            {
                var soundFile = SoundFiles.First(x => x.FullName == file);
                if (soundFile != null)
                {
                    soundFile.Status     = Status.Warning;
                    soundFile.IsSelected = false;
                }
            }

            await AudioFileManager.AdjustFiles(
                ProgressChanged,
                BaseVolume,
                SoundFiles.Where(x => x.IsSelected).Select(x => x.FullName),
                SoundFiles.Where(x => x.IsSelectedBaseVolumeFile).Select(x => x.FullName),
                FindFileOutputPath,
                FileSucceeded,
                FileFailed);

            IsRunning = false;

            foreach (var file in SoundFiles)
            {
                file.IsSelected = false;
                file.IsSelectedBaseVolumeFile = false;
            }
        }
 private void FileSucceeded(string file)
 {
     SoundFiles.First(x => x.FullName == file).Status = Status.Succeeded;
 }
 private string FindFileOutputPath(string file)
 {
     return(SoundFiles.First(x => x.FullName == file).OutputFullName);
 }