This commit is contained in:
Wiesław Šoltés 2016-09-04 13:02:08 +02:00 коммит произвёл GitHub
Родитель 9167d396b3
Коммит 2881b074f0
1 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -75,8 +75,10 @@ namespace SimpleWavSplitter.Console
else else
{ {
var v = Assembly.GetExecutingAssembly().GetName().Version; var v = Assembly.GetExecutingAssembly().GetName().Version;
var title = string.Format("SimpleWavSplitterConsole v{0}.{1}.{2}", v.Major, v.Minor, v.Build); WriteLine(
WriteLine(title); string.Format(
"SimpleWavSplitterConsole v{0}.{1}.{2}",
v.Major, v.Minor, v.Build));
Write(Environment.NewLine); Write(Environment.NewLine);
WriteLine("Usage:"); WriteLine("Usage:");
WriteLine("SimpleWavSplitter.Console <file.wav> [<OutputPath>]"); WriteLine("SimpleWavSplitter.Console <file.wav> [<OutputPath>]");
@ -86,12 +88,16 @@ namespace SimpleWavSplitter.Console
try try
{ {
long bytesTotal = 0; long bytesTotal = 0;
var splitter = new WavFileSplitter(value => Write(string.Format("\rProgress: {0:0.0}%", value))); var splitter = new WavFileSplitter(
value => Write(string.Format("\rProgress: {0:0.0}%", value)));
var sw = Stopwatch.StartNew(); var sw = Stopwatch.StartNew();
bytesTotal = splitter.SplitWavFile(fileName, outputPath, CancellationToken.None); bytesTotal = splitter.SplitWavFile(fileName, outputPath, CancellationToken.None);
sw.Stop(); sw.Stop();
Write(Environment.NewLine); Write(Environment.NewLine);
WriteLine(string.Format("Data bytes processed: {0} ({1} MB)", bytesTotal, Round((double)bytesTotal / (1024 * 1024), 1))); WriteLine(
string.Format(
"Data bytes processed: {0} ({1} MB)",
bytesTotal, Round((double)bytesTotal / (1024 * 1024), 1)));
WriteLine(string.Format("Elapsed time: {0}", sw.Elapsed)); WriteLine(string.Format("Elapsed time: {0}", sw.Elapsed));
Environment.Exit(0); Environment.Exit(0);
} }