Ejemplo n.º 1
0
        public void Start()
        {
            Errors.Log("Avis started...");

            Errors.Log("Convert started...");
            var convertingPassed = Convert();

            if (!convertingPassed)
            {
                return;
            }
            Errors.Log("Convert finished.");

            Errors.Log("Render started...");
            var rendered = false;

            var avisFolder = PathResolver.GetTempFolder("Avis");
            var tempFolder = Path.Combine(avisFolder, "Temp");
            var resampler  = Path.Combine(avisFolder, "resampler.exe");
            var appendtool = Path.Combine(avisFolder, "wavtool.exe");
            var output     = "output.wav";

            Program.Try(() =>
            {
                var renderer = new Renderer();
                rendered     = renderer.Render(Ust, Singer, tempFolder, output, resampler, appendtool);
            }, "Render failed");
            if (!rendered)
            {
                return;
            }

            HandleRendered(Path.Combine(tempFolder, output));

            Errors.Log("Avis finished.");
        }