Ejemplo n.º 1
0
 public void Start()
 {
     _Statistic        = new Statistic(Track.Duration);
     _DownloadFilePath = DownloadPathConfigurator.Configure(OutputDirectory, AudioProcessor.TargetFileExtension, Track);
     AudioProcessor.Start(_DownloadFilePath);
     Active = true;
 }
Ejemplo n.º 2
0
        public void Complete()
        {
            Stop();
            var converterOutputPath = DownloadPathConfigurator.Configure(OutputDirectory, AudioConverter.TargetFileExtension, Track);

            if (AudioConverter != null)
            {
                AudioConverter.Convert(_DownloadFilePath, converterOutputPath);
            }

            if (AudioFileDescriptor != null)
            {
                AudioFileDescriptor.Write(Mp3MetaData, (AudioConverter != null) ? converterOutputPath : _DownloadFilePath);
            }

            Finish();
        }