From dfc705aea484d637ca9e931a39f4c1fde81888ae Mon Sep 17 00:00:00 2001 From: Flamefire Date: Thu, 25 Apr 2013 17:04:14 +0200 Subject: [PATCH] Fixed some missing strings --- Vocaluxe/Base/CConfig.cs | 20 +++++++++---------- .../Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs | 2 +- Vocaluxe/Screens/CScreenNames.cs | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index bb43c7a2..6e8484f4 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -608,10 +608,10 @@ namespace Vocaluxe.Base public static int GetMaxNumMics() { int max = 0; - for (int i = 0; i < CSettings.MaxNumPlayer; i++) + for (int i = 1; i <= CSettings.MaxNumPlayer; i++) { - if (IsMicConfig(i + 1)) - max = i + 1; + if (IsMicConfig(i)) + max = i; else break; } @@ -632,7 +632,7 @@ namespace Vocaluxe.Base for (int dev = 0; dev < devices.Length; dev++) { //Has Device some signal-names in name -> This could be a (usb-)mic - if (Regex.IsMatch(devices[dev].Name, @"ReplacedStr:::0:::", RegexOptions.IgnoreCase)) + if (Regex.IsMatch(devices[dev].Name, "Usb|Wireless", RegexOptions.IgnoreCase)) { //Check if there are inputs. if (devices[dev].Inputs.Count >= 1) @@ -656,11 +656,11 @@ namespace Vocaluxe.Base } } } - //If no usb-mics found -> Look for Devices with "ReplacedStr:::1:::" or "ReplacedStr:::2:::" + //If no usb-mics found -> Look for Devices with "mic" or "mik" for (int dev = 0; dev < devices.Length; dev++) { //Has Device some signal-names in name -> This could be a mic - if (Regex.IsMatch(devices[dev].Name, @"ReplacedStr:::3:::", RegexOptions.IgnoreCase)) + if (Regex.IsMatch(devices[dev].Name, "Mic|Mik", RegexOptions.IgnoreCase)) { //Check if there are inputs. if (devices[dev].Inputs.Count >= 1) @@ -698,7 +698,7 @@ namespace Vocaluxe.Base /// Parameters public static void LoadCommandLineParams(string[] args) { - Regex spliterParam = new Regex(@"ReplacedStr:::0:::", RegexOptions.IgnoreCase); + Regex spliterParam = new Regex(@"-{1,2}|\/", RegexOptions.IgnoreCase); //Complete argument string string arguments = args.Aggregate(string.Empty, (current, arg) => current + (arg + " ")); @@ -707,7 +707,7 @@ namespace Vocaluxe.Base foreach (string text in args) { - Regex spliterVal = new Regex(@"ReplacedStr:::2:::", RegexOptions.IgnoreCase); + Regex spliterVal = new Regex(@"\s", RegexOptions.IgnoreCase); //split arg with Spilter-Regex and save in parts string[] parts = spliterVal.Split(text, 2); @@ -716,7 +716,7 @@ namespace Vocaluxe.Base { //Only found a parameter case 1: - if (!Regex.IsMatch(parts[0], @"ReplacedStr:::3:::") && parts[0] != "") + if (parts[0] != "") { //Add parameter _Params.Add(parts[0]); @@ -729,7 +729,7 @@ namespace Vocaluxe.Base //Found parameter and value case 2: - if (!Regex.IsMatch(parts[0], @"ReplacedStr:::5:::") && parts[0] != "") + if (parts[0] != "") { //Add parameter _Params.Add(parts[0]); diff --git a/Vocaluxe/Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs b/Vocaluxe/Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs index bfe4fedf..22787416 100644 --- a/Vocaluxe/Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs +++ b/Vocaluxe/Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs @@ -177,7 +177,7 @@ namespace Vocaluxe.Lib.Sound.Decoder timeStamp = (float)decoder.Timecode; _CurrentTime = timeStamp; - //Console.WriteLine(_CurrentTime.ToString("ReplacedStr:::0:::") + "ReplacedStr:::1:::" + Decoder.buffer_size.ToString()); + //Console.WriteLine(_CurrentTime.ToString("#0.000") + " Buffer size: " + Decoder.buffer_size.ToString()); buffer = new byte[decoder.BufferSize]; if (decoder.BufferSize > 0) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index c34fdae3..68e1b218 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -467,7 +467,7 @@ namespace Vocaluxe.Screens _OldMouseX = mouseEvent.X; _OldMouseY = mouseEvent.Y; } - // LeftButton isn't hold anymore, but Selec-Mode is still active -> "ReplacedStr:::0:::" of Avatar + // LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar else if (_SelectingMouseActive) { //Check if really a player was selected @@ -476,7 +476,7 @@ namespace Vocaluxe.Screens //Foreach Drop-Area for (int i = 0; i < _StaticPlayer.Length; i++) { - //Check first, if area is "ReplacedStr:::1:::" + //Check first, if area is "Active" if (_Statics[_StaticPlayer[i]].Visible) { //Check if Mouse is in area