diff --git a/Loopstream/LSEncoder.cs b/Loopstream/LSEncoder.cs index c842735..89047d9 100644 --- a/Loopstream/LSEncoder.cs +++ b/Loopstream/LSEncoder.cs @@ -10,6 +10,7 @@ namespace Loopstream { public class LSEncoder { + object locker; protected bool dump; protected Process proc; protected LSPcmFeed pimp; @@ -36,6 +37,7 @@ public LSEncoder() dump = false; settings = null; crashed = false; + locker = new object(); } protected void makeShouter() @@ -119,11 +121,16 @@ protected void makeShouter() else if (str.StartsWith("HTTP/1.0 200 OK")) { s = prepS; + stampee = 0; stdin = pstdin; stdout = pstdout; - stamps = new List(); + stamps = new long[32]; + chunks = new long[32]; + long v = DateTime.UtcNow.Ticks / 10000; + for (int a = 0; a < stamps.Length; a++) stamps[a] = v; Program.ni.ShowBalloonTip(1000, "Loopstream Connected", "Streaming to " + settings.mount + "." + enc.ext, ToolTipIcon.Info); new System.Threading.Thread(new System.Threading.ThreadStart(reader)).Start(); + new System.Threading.Thread(new System.Threading.ThreadStart(counter)).Start(); } else { @@ -132,7 +139,9 @@ protected void makeShouter() } } - public List stamps; + int stampee; + public long[] chunks; + public long[] stamps; protected void reader() { System.IO.FileStream m = null; @@ -159,9 +168,18 @@ protected void reader() } catch { + enc.FIXME_kbps = -1; crashed = true; break; } + + // speed measuring + lock (locker) + { + chunks[stampee] = i; + stamps[stampee] = DateTime.UtcNow.Ticks / 10000; + stampee = ++stampee < stamps.Length ? stampee : 0; + } } string fn = proc.StartInfo.FileName; fn = fn.Substring(fn.Replace('\\', '/').LastIndexOf('/') + 1).Split('.')[0]; @@ -169,8 +187,26 @@ protected void reader() if (m != null) m.Close(); } + void counter() + { + while (!crashed) + { + lock (locker) + { + long time = DateTime.UtcNow.Ticks / 10000; + int i = stampee + 1; + i = i >= stamps.Length ? 0 : i; + time -= stamps[i]; + enc.FIXME_kbps = Math.Max(1, ((8000.0 * (chunks.Sum() - 4096)) / time) / 1024); + } + System.Threading.Thread.Sleep(10); + } + enc.FIXME_kbps = -1; + } + public void Dispose() { + enc.FIXME_kbps = -1; stdin = stdout = null; crashed = true; proc.Kill(); diff --git a/Loopstream/LSSettings.cs b/Loopstream/LSSettings.cs index ca60de5..de30a6d 100644 --- a/Loopstream/LSSettings.cs +++ b/Loopstream/LSSettings.cs @@ -39,6 +39,53 @@ public void apply(LSPreset preset) } } + public class LSMeta + { + public enum Reader { WindowCaption, File, Website, ProcessMemory }; + public string src, ptn, tit; + [XmlIgnore] + public Encoding enc; + public string encoding { get { return enc.WebName; } set { enc = Encoding.GetEncoding(value); } } + public Reader reader; + public int freq, grp; + + public LSMeta() + { + src = ptn = tit = ""; + encoding = "UTF-8"; + reader = Reader.WindowCaption; + freq = 500; + grp = 1; + } + public LSMeta(Reader r, string ti, string sr, int fr, string pt, int grp) + { + reader = r; + tit = ti; + src = sr; + ptn = pt; + freq = fr; + encoding = "UTF-8"; + this.grp = grp; + } + public override string ToString() + { + return tit; + } + public void apply(LSMeta meta) + { + src = meta.src; + ptn = meta.ptn; + tit = meta.tit; + encoding = meta.encoding; + reader = meta.reader; + freq = meta.freq; + grp = meta.grp; + } + } + public List metas; + public LSMeta meta; + public bool latin; + public enum LSCompression { cbr, q }; public enum LSChannels { mono, stereo } public class LSParams @@ -49,6 +96,7 @@ public class LSParams public long quality; public LSChannels channels; public string ext; + public double FIXME_kbps; } LSDevice _devRec, _devMic, _devOut; @@ -76,6 +124,9 @@ public class LSParams public enum LSRelay { ice, shout, siren } public LSRelay relay; + public string title, description, genre, url; + public bool pubstream; + public bool testDevs; public bool splash; public bool recPCM; @@ -105,11 +156,22 @@ public LSSettings() ogg.channels = LSChannels.stereo; ogg.ext = "ogg"; samplerate = 44100; + host = "stream0.r-a-d.io"; port = 1337; pass = "user|assword"; mount = "main"; relay = LSRelay.ice; + title = "Loopstream"; + description = "Cave Explorer Committee"; + genre = "Post-Avant Jazzcore"; + url = "https://github.com/9001/loopstream"; + pubstream = false; + + latin = false; + meta = new LSMeta(); + metas = new List(); + presets = new LSPreset[] { new LSPreset(1.00, 1, 0.6, 1, true, false, false), new LSPreset(0.25, 1, 0.6, 1, true, true, false), @@ -153,12 +215,33 @@ in mde.EnumerateAudioEndPoints( if (!string.IsNullOrEmpty(s_devRec)) devRec = getDevByID(s_devRec); if (!string.IsNullOrEmpty(s_devMic)) devMic = getDevByID(s_devMic); if (!string.IsNullOrEmpty(s_devOut)) devOut = getDevByID(s_devOut); - + } + public void initWhenDeserializationFails() + { + if (metas.Count == 0) + { + metas.AddRange(new LSMeta[] { + new LSMeta(LSMeta.Reader.WindowCaption, "Foobar 2000", "foobar2000", 500, + @" *(.*[^ ]) *( - foobar2000$|\[foobar2000 v([0-9\.]*)\]$)", 1), + new LSMeta(LSMeta.Reader.WindowCaption, "Winamp", "winamp", 500, + @"([0-9]*\. )? *(.*[^ ]) * - Winamp$", 2), + new LSMeta(LSMeta.Reader.WindowCaption, "VLC", "vlc", 500, + @" *(.*[^ ]) * - VLC media player", 1), + new LSMeta(LSMeta.Reader.ProcessMemory, "iTunes 64bit 11.0.4.4", "itunes", 500, + "iTunes.dll+15C4D52, iTunes.dll+15C4952", 1), + new LSMeta(LSMeta.Reader.Website, "other icecast mount", "http://stream0.r-a-d.io:8000/", 2000, + "\\n

Mount Point /main.mp3

.*?Current Song:\\n(.*?)", 1), + }); + } + } + public void runTests(Splesh splesh) + { if (testDevs) { - foreach (LSDevice dev in devs) + for (int a = 0; a < devs.Length; a++) { - dev.test(); + splesh.prog(a + 1, devs.Length); + devs[a].test(); } /*using (System.IO.StreamWriter sw = new System.IO.StreamWriter("Loopstream.devs", false, Encoding.UTF8)) { @@ -215,7 +298,7 @@ static int version() public void save() { XmlSerializer x = new XmlSerializer(this.GetType()); - using (var s = System.IO.File.OpenWrite("Loopstream.ini")) + using (var s = new System.IO.FileStream("Loopstream.ini", System.IO.FileMode.Create)) { byte[] ver = System.Text.Encoding.UTF8.GetBytes(version().ToString("x") + "\n"); s.Write(ver, 0, ver.Length); @@ -233,16 +316,8 @@ public static LSSettings load() string str = System.IO.File.ReadAllText("Loopstream.ini", Encoding.UTF8); string ver = str.Substring(0, str.IndexOf('\n')); str = str.Substring(ver.Length + 1); - if (str.EndsWith(">>")) - { - str = str.Substring(0, str.Length - 1); - } System.IO.MemoryStream s = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(str)); - // FIXED LOL - - - int myVer = version(); int iniVer = Convert.ToInt32(ver, 16); if (myVer != iniVer && false) @@ -271,6 +346,9 @@ public static LSSettings load() try { ret.init(); + ret.mp3.FIXME_kbps = + ret.ogg.FIXME_kbps = -1; + return ret; } catch (Exception e) { @@ -279,10 +357,8 @@ public static LSSettings load() e.Message + "\r\n\r\n" + e.Source + "\r\n\r\n" + e.InnerException + "\r\n\r\n" + e.StackTrace); } } - else - { - ret = new LSSettings(); - } + ret = new LSSettings(); + ret.initWhenDeserializationFails(); // it is 06:20 am, what are you looking at return ret; } } diff --git a/Loopstream/LSTag.cs b/Loopstream/LSTag.cs new file mode 100644 index 0000000..13dbf04 --- /dev/null +++ b/Loopstream/LSTag.cs @@ -0,0 +1,263 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace Loopstream +{ + class LSTag + { + string auth; + Encoding latin1; + public string tag; + LSSettings settings; + bool haveFailed; + + public LSTag(LSSettings set) + { + tag = ""; + settings = set; + haveFailed = false; + latin1 = Encoding.GetEncoding("ISO_8859-1"); + + auth = "source:" + settings.pass; + auth = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(auth)); + new System.Threading.Thread(new System.Threading.ThreadStart(feeder)).Start(); + } + + public static string get(LSSettings.LSMeta m, bool getRaw) + { + if (m.reader == LSSettings.LSMeta.Reader.WindowCaption) + { + Process[] proc = Process.GetProcessesByName(m.src); + if (proc.Length < 1) + { + return "(no such process)"; + } + string raw = proc[0].MainWindowTitle; + return getRaw ? raw : get(m, raw); + } + if (m.reader == LSSettings.LSMeta.Reader.File) + { + string ret = null; + try + { + ret = System.IO.File.ReadAllText(m.src, m.enc); + } + catch + { + ret = "(file read failure)"; + } + return getRaw ? ret : get(m, ret); + } + if (m.reader == LSSettings.LSMeta.Reader.Website) + { + string ret; + byte[] b; + try + { + b = new System.Net.WebClient().DownloadData(m.src); + try + { + ret = m.enc.GetString(b); + } + catch + { + ret = "(web decode failure)"; + } + } + catch + { + ret = "(web request failure)"; + } + return getRaw ? ret : get(m, ret); + } + if (m.reader == LSSettings.LSMeta.Reader.ProcessMemory) + { + // this is the fun one + Process[] proc = Process.GetProcessesByName(m.src); + if (proc.Length < 1) + { + return "(no such process)"; + } + LSMem mem; + try + { + mem = new LSMem(proc[0]); + } + catch + { + return "(poke failure)"; + } + try + { + string ret = ""; + string lpm = ""; + ProcessModule pm = null; + byte[] raw = new byte[1024]; + string[] ad = m.ptn.Split(' '); + for (int a = 0; a < ad.Length; a++) + { + string arg = ad[a].Trim(',', ' '); + IntPtr ofs = IntPtr.Zero; + if (arg.Contains('+')) + { + string[] args = arg.Split('+'); + if (args[0] != lpm) + { + pm = null; + lpm = null; + foreach (ProcessModule mod in proc[0].Modules) + { + if (mod.ModuleName == args[0]) + //if (mod.FileName.EndsWith("\\iTunes.dll")) + { + pm = mod; + lpm = pm.ModuleName; + ofs = pm.BaseAddress; + break; + } + } + } + else + { + ofs = pm.BaseAddress; + } + arg = args[1]; + } + ofs += Convert.ToInt32(arg, 16); + ret += a == 0 ? "" : " - "; + int len = mem.read(ofs, raw); + if (len <= 0) + { + ret += "(read error)"; + } + else + { + ret += m.enc.GetString(raw); + int i = ret.IndexOf('\0'); + if (i > 0) + { + ret = ret.Substring(0, i); + } + } + } + return ret; + } + catch + { + return "(peek failure)"; + } + } + return "(unexpected failure)"; + } + + public static string get(LSSettings.LSMeta m, string raw) + { + if (m.reader == LSSettings.LSMeta.Reader.ProcessMemory) + { + throw new Exception("if you are seeing this, go whine to ed"); + } + GroupCollection r; + try + { + r = Regex.Match(raw, m.ptn, RegexOptions.Singleline).Groups; + } + catch + { + return "(bad regex)"; + } + try + { + return r[m.grp].Value.Trim(' ', '\t', '\r', '\n'); // you can never be too sure + } + catch + { + return "(no match)"; + } + } + + void feeder() + { + Est[] est = { + settings.mp3.enabled ? new Est("", settings.mp3) : null, + settings.ogg.enabled ? new Est("", settings.ogg) : null, + }; + while (true) + { + LSSettings.LSMeta m = settings.meta; + tag = get(m, false); + if (!string.IsNullOrEmpty(tag)) + { + foreach (Est e in est) + { + if (e != null && + e.tag != tag && + e.enc.FIXME_kbps > 0) + { + e.tag = tag; + sendTags(e); + } + } + } + System.Threading.Thread.Sleep(settings.meta.freq); + } + } + + void sendTags(Est est) + { + string meta; + if (settings.latin) + { + meta = Uri.EscapeUriString(latin1.GetString(Encoding.UTF8.GetBytes(est.tag))).Replace("+", "%2B"); + } + else + { + //meta = Uri.EscapeUriString(est.tag).Replace("+", "%2B"); + meta = Chencode.HonkHonk(est.tag); + //meta = est.tag; + } + try + { + using (System.Net.WebClient wc = new System.Net.WebClient()) + { + wc.Headers.Add("Authorization: Basic " + auth); + string msg = wc.DownloadString(string.Format( + "http://{0}:{1}/admin/metadata?mode=updinfo&mount=/{2}.{3}&charset=UTF-8&song={4}", + settings.host, + settings.port, + settings.mount, + est.enc.ext, + meta)); + + if (!haveFailed && !msg.Contains("1")) + { + haveFailed = true; + msg = msg.Contains("") ? msg.Substring(msg.IndexOf("") + 9) : msg; + msg = msg.Contains("") ? msg.Substring(0, msg.LastIndexOf("")) : msg; + System.Windows.Forms.MessageBox.Show("Metadata broadcast failure:\r\n\r\n" + msg, "Tags failed", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Error); + } + } + } + catch + { + tag = "Meta-fail " + est.enc.ext; + } + } + + private class Est + { + public string tag; + public LSSettings.LSParams enc; + public Est(string s, LSSettings.LSParams e) + { + tag = s; + enc = e; + } + } + } +} diff --git a/Loopstream/Loopstream.csproj b/Loopstream/Loopstream.csproj index 58092cf..ffc93cd 100644 --- a/Loopstream/Loopstream.csproj +++ b/Loopstream/Loopstream.csproj @@ -54,28 +54,33 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + Component + + Component + Form diff --git a/Loopstream/Properties/AssemblyInfo.cs b/Loopstream/Properties/AssemblyInfo.cs index d895ff6..1667d16 100644 --- a/Loopstream/Properties/AssemblyInfo.cs +++ b/Loopstream/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.1.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/Loopstream/UC_LLabel.cs b/Loopstream/UC_LLabel.cs index 31a4fca..0abdcb8 100644 --- a/Loopstream/UC_LLabel.cs +++ b/Loopstream/UC_LLabel.cs @@ -28,14 +28,24 @@ public LLabel() light = new Pen(new SolidBrush(SystemColors.ControlLightLight)); Color ca = SystemColors.ControlLight; Color cb = SystemColors.ControlLightLight; - Color one = Color.FromArgb( - ca.R + (cb.R - ca.R) / 3, - ca.G + (cb.G - ca.G) / 3, - ca.B + (cb.B - ca.B) / 3); - Color two = Color.FromArgb( - one.R + (cb.R - ca.R) / 3, - one.G + (cb.G - ca.G) / 3, - one.B + (cb.B - ca.B) / 3); + Color one, two; + try + { + one = Color.FromArgb( + ca.R + (cb.R - ca.R) / 3, + ca.G + (cb.G - ca.G) / 3, + ca.B + (cb.B - ca.B) / 3); + two = Color.FromArgb( + one.R + (cb.R - ca.R) / 3, + one.G + (cb.G - ca.G) / 3, + one.B + (cb.B - ca.B) / 3); + } + catch + { + // TODO: Check order + one = ca; + two = cb; + } gra = Color.FromArgb(255, cb.R, cb.G, cb.B); grb = Color.FromArgb(96, ca.R, ca.G, ca.B); grc = Color.FromArgb(16, 0, 0, 0); diff --git a/Loopstream/UC_TLabel.cs b/Loopstream/UC_TLabel.cs new file mode 100644 index 0000000..6ad82dc --- /dev/null +++ b/Loopstream/UC_TLabel.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Loopstream +{ + public class TLabel : Label + { + Pen pen; + Image bg; + Brush ctl; + Color gra, grb; + public TLabel() + : base() + { + ctl = new SolidBrush(Color.Fuchsia); + pen = new Pen(new SolidBrush(SystemColors.ControlDark)); + Color ca = SystemColors.ControlLightLight; + Color cb = SystemColors.Control; + try + { + grb = Color.FromArgb( + cb.R + (ca.R - cb.R) / 3, + cb.G + (ca.G - cb.G) / 3, + cb.B + (ca.B - cb.B) / 3); + grb = cb; + gra = Color.FromArgb( + grb.R + (ca.R - cb.R) / 2, + grb.G + (ca.G - cb.G) / 2, + grb.B + (ca.B - cb.B) / 2); + } + catch + { + gra = ca; + grb = cb; + } + ShadeBack = false; + } + public bool ShadeBack; + protected override void OnPaintBackground(PaintEventArgs pevent) + { + if (LicenseManager.UsageMode == LicenseUsageMode.Designtime) + { + base.OnPaintBackground(pevent); + return; + } + Graphics g = pevent.Graphics; + Rectangle re = pevent.ClipRectangle; + Rectangle fre = new Rectangle(0, 11, this.Width - 1, this.Height - 11); + LinearGradientBrush lg = new LinearGradientBrush(fre, gra, grb, 90); + ctl.Dispose(); // HOW AND WHY WAS THIS NECESSARY + ctl = new SolidBrush(this.BackColor); + g.FillRectangle(ctl, re); + + if (!ShadeBack) return; + + GraphicsPath gp = new GraphicsPath(); + gp.AddLines(new Point[]{ + new Point(0, fre.Height + fre.Top), + new Point(fre.Top, fre.Top), + new Point(fre.Width - fre.Top, fre.Top), + new Point(fre.Width, fre.Height + fre.Top), + }); + + g.CompositingMode = CompositingMode.SourceOver; + g.CompositingQuality = CompositingQuality.HighQuality; + g.InterpolationMode = InterpolationMode.High; + g.SmoothingMode = SmoothingMode.HighQuality; + g.FillPath(lg, gp); + g.DrawPath(pen, gp); + } + } +} diff --git a/Loopstream/UI_ConfigSC.Designer.cs b/Loopstream/UI_ConfigSC.Designer.cs index d7d34ff..d290ad4 100644 --- a/Loopstream/UI_ConfigSC.Designer.cs +++ b/Loopstream/UI_ConfigSC.Designer.cs @@ -32,7 +32,6 @@ private void InitializeComponent() this.gOutS = new System.Windows.Forms.ComboBox(); this.gTwoS = new System.Windows.Forms.ComboBox(); this.gOneS = new System.Windows.Forms.ComboBox(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); this.gSiren = new System.Windows.Forms.RadioButton(); this.gIce = new System.Windows.Forms.RadioButton(); this.gShout = new System.Windows.Forms.RadioButton(); @@ -44,64 +43,116 @@ private void InitializeComponent() this.gHost = new System.Windows.Forms.TextBox(); this.gSave = new System.Windows.Forms.Button(); this.gCancel = new System.Windows.Forms.Button(); - this.label5 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.gLeft = new System.Windows.Forms.CheckBox(); this.gRight = new System.Windows.Forms.CheckBox(); - this.panel1 = new System.Windows.Forms.Panel(); - this.gOgg = new System.Windows.Forms.Label(); - this.gMp3 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); + this.pWrapper = new System.Windows.Forms.Panel(); + this.tc = new System.Windows.Forms.TabControl(); + this.tpSoundcard = new System.Windows.Forms.TabPage(); this.label3 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); + this.gRecPCM = new System.Windows.Forms.CheckBox(); + this.gAutohide = new System.Windows.Forms.CheckBox(); this.gRate = new System.Windows.Forms.TextBox(); - this.pMp3 = new System.Windows.Forms.Panel(); + this.gAutoconn = new System.Windows.Forms.CheckBox(); + this.gUnavail = new System.Windows.Forms.CheckBox(); + this.gTestDevs = new System.Windows.Forms.CheckBox(); + this.tpServer = new System.Windows.Forms.TabPage(); + this.gPublic = new System.Windows.Forms.CheckBox(); + this.label15 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.gURL = new System.Windows.Forms.TextBox(); + this.gTitle = new System.Windows.Forms.TextBox(); + this.gGenre = new System.Windows.Forms.TextBox(); + this.gDescription = new System.Windows.Forms.TextBox(); + this.tpEncoders = new System.Windows.Forms.TabPage(); this.gMp3Stereo = new System.Windows.Forms.RadioButton(); + this.gOggStereo = new System.Windows.Forms.RadioButton(); this.gMp3Enable = new System.Windows.Forms.CheckBox(); + this.gRecOGG = new System.Windows.Forms.CheckBox(); this.gMp3Mono = new System.Windows.Forms.RadioButton(); + this.gOggEnable = new System.Windows.Forms.CheckBox(); + this.gRecMP3 = new System.Windows.Forms.CheckBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.gMp3BitrateV = new System.Windows.Forms.TextBox(); this.gMp3Quality = new System.Windows.Forms.RadioButton(); this.gMp3QualityV = new System.Windows.Forms.TextBox(); this.gMp3Bitrate = new System.Windows.Forms.RadioButton(); - this.pOgg = new System.Windows.Forms.Panel(); - this.gOggStereo = new System.Windows.Forms.RadioButton(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.gOggBitrateV = new System.Windows.Forms.TextBox(); this.gOggQuality = new System.Windows.Forms.RadioButton(); this.gOggQualityV = new System.Windows.Forms.TextBox(); this.gOggBitrate = new System.Windows.Forms.RadioButton(); this.gOggMono = new System.Windows.Forms.RadioButton(); - this.gOggEnable = new System.Windows.Forms.CheckBox(); - this.gTestDevs = new System.Windows.Forms.CheckBox(); + this.tpTags = new System.Windows.Forms.TabPage(); + this.gMeta = new System.Windows.Forms.ComboBox(); + this.label16 = new System.Windows.Forms.Label(); + this.gTagsAdvanced = new System.Windows.Forms.Button(); + this.pTagsAdvanced2 = new System.Windows.Forms.Panel(); + this.gDelete = new System.Windows.Forms.Button(); + this.gLatinize = new System.Windows.Forms.CheckBox(); + this.pTagAdvanced1 = new System.Windows.Forms.Panel(); + this.label17 = new System.Windows.Forms.Label(); + this.gEncodingL = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.gResult = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.gEncoding = new System.Windows.Forms.TextBox(); + this.gReader = new System.Windows.Forms.ComboBox(); + this.label19 = new System.Windows.Forms.Label(); + this.gTest = new System.Windows.Forms.CheckBox(); + this.gFreq = new System.Windows.Forms.TextBox(); + this.label20 = new System.Windows.Forms.Label(); + this.gReload = new System.Windows.Forms.Button(); + this.label22 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.gPattern = new System.Windows.Forms.TextBox(); + this.label23 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.gStore = new System.Windows.Forms.Button(); + this.gSource = new System.Windows.Forms.TextBox(); + this.gName = new System.Windows.Forms.TextBox(); + this.pFooter = new System.Windows.Forms.Panel(); + this.pButtons = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); this.gSplash = new System.Windows.Forms.CheckBox(); - this.gRecMP3 = new System.Windows.Forms.CheckBox(); - this.gRecPCM = new System.Windows.Forms.CheckBox(); - this.gUnavail = new System.Windows.Forms.CheckBox(); - this.gRecOGG = new System.Windows.Forms.CheckBox(); - this.gAutoconn = new System.Windows.Forms.CheckBox(); - this.gAutohide = new System.Windows.Forms.CheckBox(); + this.pTabs = new System.Windows.Forms.Panel(); + this.label5 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); this.tt = new System.Windows.Forms.ToolTip(this.components); - this.groupBox4.SuspendLayout(); - this.panel1.SuspendLayout(); - this.pMp3.SuspendLayout(); + this.label25 = new System.Windows.Forms.Label(); + this.gGroup = new System.Windows.Forms.TextBox(); + this.hTags = new Loopstream.TLabel(); + this.hEncoders = new Loopstream.TLabel(); + this.hServer = new Loopstream.TLabel(); + this.hSoundcard = new Loopstream.TLabel(); + this.pWrapper.SuspendLayout(); + this.tc.SuspendLayout(); + this.tpSoundcard.SuspendLayout(); + this.tpServer.SuspendLayout(); + this.tpEncoders.SuspendLayout(); this.groupBox1.SuspendLayout(); - this.pOgg.SuspendLayout(); this.groupBox2.SuspendLayout(); + this.tpTags.SuspendLayout(); + this.pTagsAdvanced2.SuspendLayout(); + this.pTagAdvanced1.SuspendLayout(); + this.pFooter.SuspendLayout(); + this.pButtons.SuspendLayout(); + this.pTabs.SuspendLayout(); this.SuspendLayout(); // // gOutS // this.gOutS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.gOutS.FormattingEnabled = true; - this.gOutS.Location = new System.Drawing.Point(94, 66); - this.gOutS.Margin = new System.Windows.Forms.Padding(3, 3, 3, 8); + this.gOutS.Location = new System.Drawing.Point(101, 72); this.gOutS.Name = "gOutS"; this.gOutS.Size = new System.Drawing.Size(418, 21); - this.gOutS.TabIndex = 15; + this.gOutS.TabIndex = 5; this.tt.SetToolTip(this.gOutS, "A set of speakers to play the final mix on\r\n (can be the same as input Music)\r" + "\n (can be muted on the mixer board)"); this.gOutS.SelectedIndexChanged += new System.EventHandler(this.gOutS_SelectedIndexChanged); @@ -110,10 +161,10 @@ private void InitializeComponent() // this.gTwoS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.gTwoS.FormattingEnabled = true; - this.gTwoS.Location = new System.Drawing.Point(94, 12); + this.gTwoS.Location = new System.Drawing.Point(101, 18); this.gTwoS.Name = "gTwoS"; this.gTwoS.Size = new System.Drawing.Size(305, 21); - this.gTwoS.TabIndex = 12; + this.gTwoS.TabIndex = 1; this.tt.SetToolTip(this.gTwoS, "The microphone you will use to voiceover on the stream"); this.gTwoS.SelectedIndexChanged += new System.EventHandler(this.gTwoS_SelectedIndexChanged); // @@ -121,42 +172,23 @@ private void InitializeComponent() // this.gOneS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.gOneS.FormattingEnabled = true; - this.gOneS.Location = new System.Drawing.Point(94, 39); + this.gOneS.Location = new System.Drawing.Point(101, 45); this.gOneS.Name = "gOneS"; this.gOneS.Size = new System.Drawing.Size(418, 21); - this.gOneS.TabIndex = 9; + this.gOneS.TabIndex = 4; this.tt.SetToolTip(this.gOneS, "The set of speakers you will be playing music on\r\n (either your regular speake" + "rs or a separate soundcard)"); this.gOneS.SelectedIndexChanged += new System.EventHandler(this.gOneS_SelectedIndexChanged); // - // groupBox4 - // - this.groupBox4.Controls.Add(this.gSiren); - this.groupBox4.Controls.Add(this.gIce); - this.groupBox4.Controls.Add(this.gShout); - this.groupBox4.Controls.Add(this.label6); - this.groupBox4.Controls.Add(this.label7); - this.groupBox4.Controls.Add(this.gPass); - this.groupBox4.Controls.Add(this.gMount); - this.groupBox4.Controls.Add(this.label4); - this.groupBox4.Controls.Add(this.gHost); - this.groupBox4.Location = new System.Drawing.Point(261, 107); - this.groupBox4.Margin = new System.Windows.Forms.Padding(14); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(251, 120); - this.groupBox4.TabIndex = 27; - this.groupBox4.TabStop = false; - this.groupBox4.Text = "Radio server"; - // // gSiren // this.gSiren.AutoSize = true; this.gSiren.Enabled = false; - this.gSiren.Location = new System.Drawing.Point(195, 97); + this.gSiren.Location = new System.Drawing.Point(214, 96); this.gSiren.Margin = new System.Windows.Forms.Padding(3, 3, 7, 3); this.gSiren.Name = "gSiren"; this.gSiren.Size = new System.Drawing.Size(49, 17); - this.gSiren.TabIndex = 37; + this.gSiren.TabIndex = 17; this.gSiren.Text = "Siren"; this.tt.SetToolTip(this.gSiren, "This is a siren server (in-house protocol)"); this.gSiren.UseVisualStyleBackColor = true; @@ -166,11 +198,11 @@ private void InitializeComponent() // this.gIce.AutoSize = true; this.gIce.Checked = true; - this.gIce.Location = new System.Drawing.Point(145, 97); + this.gIce.Location = new System.Drawing.Point(164, 96); this.gIce.Margin = new System.Windows.Forms.Padding(3, 3, 7, 3); this.gIce.Name = "gIce"; this.gIce.Size = new System.Drawing.Size(40, 17); - this.gIce.TabIndex = 36; + this.gIce.TabIndex = 16; this.gIce.TabStop = true; this.gIce.Text = "Ice"; this.tt.SetToolTip(this.gIce, "This is an icecast server"); @@ -181,11 +213,11 @@ private void InitializeComponent() // this.gShout.AutoSize = true; this.gShout.Enabled = false; - this.gShout.Location = new System.Drawing.Point(82, 97); + this.gShout.Location = new System.Drawing.Point(101, 96); this.gShout.Margin = new System.Windows.Forms.Padding(3, 3, 7, 3); this.gShout.Name = "gShout"; this.gShout.Size = new System.Drawing.Size(53, 17); - this.gShout.TabIndex = 35; + this.gShout.TabIndex = 15; this.gShout.Text = "Shout"; this.tt.SetToolTip(this.gShout, "This is a ShoutCAST server"); this.gShout.UseVisualStyleBackColor = true; @@ -194,7 +226,7 @@ private void InitializeComponent() // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(6, 74); + this.label6.Location = new System.Drawing.Point(21, 73); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(60, 13); this.label6.TabIndex = 34; @@ -203,7 +235,7 @@ private void InitializeComponent() // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(6, 48); + this.label7.Location = new System.Drawing.Point(21, 47); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(53, 13); this.label7.TabIndex = 33; @@ -211,10 +243,10 @@ private void InitializeComponent() // // gPass // - this.gPass.Location = new System.Drawing.Point(82, 45); + this.gPass.Location = new System.Drawing.Point(101, 44); this.gPass.Name = "gPass"; this.gPass.Size = new System.Drawing.Size(163, 20); - this.gPass.TabIndex = 31; + this.gPass.TabIndex = 13; this.gPass.Text = "user|assword"; this.tt.SetToolTip(this.gPass, "Username \"source\" is assumed, this is your source password."); this.gPass.TextChanged += new System.EventHandler(this.gPass_TextChanged); @@ -223,10 +255,10 @@ private void InitializeComponent() // // gMount // - this.gMount.Location = new System.Drawing.Point(82, 71); + this.gMount.Location = new System.Drawing.Point(101, 70); this.gMount.Name = "gMount"; this.gMount.Size = new System.Drawing.Size(163, 20); - this.gMount.TabIndex = 32; + this.gMount.TabIndex = 14; this.gMount.Text = "main"; this.tt.SetToolTip(this.gMount, "The mountpoint to stream to:\r\n NOT including the preceding /\r\n NOT includin" + "g .extension"); @@ -237,7 +269,7 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(6, 22); + this.label4.Location = new System.Drawing.Point(21, 21); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(45, 13); this.label4.TabIndex = 29; @@ -245,10 +277,10 @@ private void InitializeComponent() // // gHost // - this.gHost.Location = new System.Drawing.Point(82, 19); + this.gHost.Location = new System.Drawing.Point(101, 18); this.gHost.Name = "gHost"; this.gHost.Size = new System.Drawing.Size(163, 20); - this.gHost.TabIndex = 21; + this.gHost.TabIndex = 12; this.gHost.Text = "stream0.r-a-d.io:1337"; this.tt.SetToolTip(this.gHost, "The server you will stream to.\r\nUse one of either:\r\n DOMAIN:PORT\r\n IPADDRES" + "S:PORT\r\n HOSTNAME:PORT\r\n"); @@ -258,10 +290,11 @@ private void InitializeComponent() // // gSave // - this.gSave.Location = new System.Drawing.Point(260, 245); + this.gSave.Location = new System.Drawing.Point(40, 6); + this.gSave.Margin = new System.Windows.Forms.Padding(3, 3, 6, 3); this.gSave.Name = "gSave"; this.gSave.Size = new System.Drawing.Size(121, 50); - this.gSave.TabIndex = 29; + this.gSave.TabIndex = 52; this.gSave.Text = "S A V E 4 E V A"; this.tt.SetToolTip(this.gSave, "Save and apply this configuration"); this.gSave.UseVisualStyleBackColor = true; @@ -269,31 +302,19 @@ private void InitializeComponent() // // gCancel // - this.gCancel.Location = new System.Drawing.Point(391, 245); + this.gCancel.Location = new System.Drawing.Point(170, 6); this.gCancel.Name = "gCancel"; this.gCancel.Size = new System.Drawing.Size(121, 50); - this.gCancel.TabIndex = 30; + this.gCancel.TabIndex = 53; this.gCancel.Text = "A p p l y o n l y"; this.tt.SetToolTip(this.gCancel, "Apply this configuration only for this session"); this.gCancel.UseVisualStyleBackColor = true; this.gCancel.Click += new System.EventHandler(this.button2_Click); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.label5.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.label5.Location = new System.Drawing.Point(13, 111); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(64, 170); - this.label5.TabIndex = 31; - this.label5.Text = "L\r\n o\r\n o\r\n p\r\nS\r\n t\r\n r\r\n e\r\n a\r\n " + - "m"; // // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(12, 69); + this.label8.Location = new System.Drawing.Point(19, 75); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(68, 13); this.label8.TabIndex = 32; @@ -302,7 +323,7 @@ private void InitializeComponent() // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(13, 42); + this.label9.Location = new System.Drawing.Point(20, 48); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(61, 13); this.label9.TabIndex = 33; @@ -311,7 +332,7 @@ private void InitializeComponent() // label10 // this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(13, 15); + this.label10.Location = new System.Drawing.Point(20, 21); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(50, 13); this.label10.TabIndex = 34; @@ -320,11 +341,11 @@ private void InitializeComponent() // gLeft // this.gLeft.AutoSize = true; - this.gLeft.Location = new System.Drawing.Point(411, 14); + this.gLeft.Location = new System.Drawing.Point(418, 20); this.gLeft.Margin = new System.Windows.Forms.Padding(9, 3, 3, 3); this.gLeft.Name = "gLeft"; this.gLeft.Size = new System.Drawing.Size(44, 17); - this.gLeft.TabIndex = 35; + this.gLeft.TabIndex = 2; this.gLeft.Text = "Left"; this.tt.SetToolTip(this.gLeft, "Use the left audio channel of the microphone?"); this.gLeft.UseVisualStyleBackColor = true; @@ -335,106 +356,110 @@ private void InitializeComponent() this.gRight.AutoSize = true; this.gRight.Checked = true; this.gRight.CheckState = System.Windows.Forms.CheckState.Checked; - this.gRight.Location = new System.Drawing.Point(461, 14); + this.gRight.Location = new System.Drawing.Point(468, 20); this.gRight.Name = "gRight"; this.gRight.Size = new System.Drawing.Size(51, 17); - this.gRight.TabIndex = 36; + this.gRight.TabIndex = 3; this.gRight.Text = "Right"; this.tt.SetToolTip(this.gRight, "Use the right audio channel of the microphone?"); this.gRight.UseVisualStyleBackColor = true; this.gRight.CheckedChanged += new System.EventHandler(this.gRight_CheckedChanged); // - // panel1 - // - this.panel1.BackColor = System.Drawing.SystemColors.Control; - this.panel1.Controls.Add(this.gOgg); - this.panel1.Controls.Add(this.gMp3); - this.panel1.Controls.Add(this.label13); - this.panel1.Controls.Add(this.label2); - this.panel1.Controls.Add(this.label3); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.gRate); - this.panel1.Controls.Add(this.label8); - this.panel1.Controls.Add(this.gRight); - this.panel1.Controls.Add(this.gCancel); - this.panel1.Controls.Add(this.groupBox4); - this.panel1.Controls.Add(this.gSave); - this.panel1.Controls.Add(this.gOneS); - this.panel1.Controls.Add(this.gLeft); - this.panel1.Controls.Add(this.gTwoS); - this.panel1.Controls.Add(this.label10); - this.panel1.Controls.Add(this.gOutS); - this.panel1.Controls.Add(this.label9); - this.panel1.Controls.Add(this.label5); - this.panel1.Controls.Add(this.pMp3); - this.panel1.Controls.Add(this.pOgg); - this.panel1.Dock = System.Windows.Forms.DockStyle.Left; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(542, 319); - this.panel1.TabIndex = 37; - // - // gOgg - // - this.gOgg.AutoSize = true; - this.gOgg.Location = new System.Drawing.Point(165, 107); - this.gOgg.Name = "gOgg"; - this.gOgg.Size = new System.Drawing.Size(65, 13); - this.gOgg.TabIndex = 45; - this.gOgg.Text = "OGG/Vorbis"; - this.gOgg.Click += new System.EventHandler(this.gOgg_Click); - // - // gMp3 - // - this.gMp3.AutoSize = true; - this.gMp3.Location = new System.Drawing.Point(98, 107); - this.gMp3.Name = "gMp3"; - this.gMp3.Size = new System.Drawing.Size(60, 13); - this.gMp3.TabIndex = 44; - this.gMp3.Text = "MP3/Lame"; - this.gMp3.Click += new System.EventHandler(this.gMp3_Click); - // - // label13 - // - this.label13.BackColor = System.Drawing.SystemColors.ControlDarkDark; - this.label13.Location = new System.Drawing.Point(94, 121); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(139, 1); - this.label13.TabIndex = 43; - // - // label2 - // - this.label2.BackColor = System.Drawing.SystemColors.ButtonHighlight; - this.label2.Dock = System.Windows.Forms.DockStyle.Right; - this.label2.Location = new System.Drawing.Point(540, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(1, 319); - this.label2.TabIndex = 38; + // pWrapper + // + this.pWrapper.BackColor = System.Drawing.SystemColors.Control; + this.pWrapper.Controls.Add(this.tc); + this.pWrapper.Controls.Add(this.pFooter); + this.pWrapper.Controls.Add(this.pTabs); + this.pWrapper.Dock = System.Windows.Forms.DockStyle.Fill; + this.pWrapper.Location = new System.Drawing.Point(0, 0); + this.pWrapper.Name = "pWrapper"; + this.pWrapper.Padding = new System.Windows.Forms.Padding(0, 17, 0, 0); + this.pWrapper.Size = new System.Drawing.Size(542, 388); + this.pWrapper.TabIndex = 37; + // + // tc + // + this.tc.Appearance = System.Windows.Forms.TabAppearance.FlatButtons; + this.tc.Controls.Add(this.tpSoundcard); + this.tc.Controls.Add(this.tpServer); + this.tc.Controls.Add(this.tpEncoders); + this.tc.Controls.Add(this.tpTags); + this.tc.Dock = System.Windows.Forms.DockStyle.Fill; + this.tc.Location = new System.Drawing.Point(0, 17); + this.tc.Name = "tc"; + this.tc.SelectedIndex = 0; + this.tc.Size = new System.Drawing.Size(542, 304); + this.tc.TabIndex = 41; + // + // tpSoundcard + // + this.tpSoundcard.BackColor = System.Drawing.SystemColors.Control; + this.tpSoundcard.Controls.Add(this.gTwoS); + this.tpSoundcard.Controls.Add(this.label10); + this.tpSoundcard.Controls.Add(this.gOutS); + this.tpSoundcard.Controls.Add(this.label3); + this.tpSoundcard.Controls.Add(this.gRecPCM); + this.tpSoundcard.Controls.Add(this.label9); + this.tpSoundcard.Controls.Add(this.gAutohide); + this.tpSoundcard.Controls.Add(this.gRate); + this.tpSoundcard.Controls.Add(this.gAutoconn); + this.tpSoundcard.Controls.Add(this.gLeft); + this.tpSoundcard.Controls.Add(this.gOneS); + this.tpSoundcard.Controls.Add(this.gUnavail); + this.tpSoundcard.Controls.Add(this.gRight); + this.tpSoundcard.Controls.Add(this.label8); + this.tpSoundcard.Controls.Add(this.gTestDevs); + this.tpSoundcard.Location = new System.Drawing.Point(4, 25); + this.tpSoundcard.Name = "tpSoundcard"; + this.tpSoundcard.Padding = new System.Windows.Forms.Padding(3); + this.tpSoundcard.Size = new System.Drawing.Size(534, 275); + this.tpSoundcard.TabIndex = 0; + this.tpSoundcard.Text = "Soundcard"; // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(96, 277); + this.label3.Location = new System.Drawing.Point(19, 102); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(65, 13); this.label3.TabIndex = 24; this.label3.Text = "SampleRate"; // - // label1 + // gRecPCM // - this.label1.BackColor = System.Drawing.SystemColors.ButtonShadow; - this.label1.Dock = System.Windows.Forms.DockStyle.Right; - this.label1.Location = new System.Drawing.Point(541, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(1, 319); - this.label1.TabIndex = 37; + this.gRecPCM.AutoSize = true; + this.gRecPCM.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gRecPCM.Location = new System.Drawing.Point(101, 207); + this.gRecPCM.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gRecPCM.Name = "gRecPCM"; + this.gRecPCM.Size = new System.Drawing.Size(138, 17); + this.gRecPCM.TabIndex = 9; + this.gRecPCM.Text = "Record streams to PCM"; + this.tt.SetToolTip(this.gRecPCM, "Record a copy of your streams as raw PCM audio"); + this.gRecPCM.UseVisualStyleBackColor = true; + this.gRecPCM.CheckedChanged += new System.EventHandler(this.gRecPCM_CheckedChanged); + // + // gAutohide + // + this.gAutohide.AutoSize = true; + this.gAutohide.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gAutohide.Location = new System.Drawing.Point(340, 207); + this.gAutohide.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gAutohide.Name = "gAutohide"; + this.gAutohide.Size = new System.Drawing.Size(122, 17); + this.gAutohide.TabIndex = 11; + this.gAutohide.Text = "On startup, autohide"; + this.tt.SetToolTip(this.gAutohide, "Hide after startup sequence"); + this.gAutohide.UseVisualStyleBackColor = true; + this.gAutohide.CheckedChanged += new System.EventHandler(this.gAutohide_CheckedChanged); // // gRate // - this.gRate.Location = new System.Drawing.Point(168, 274); + this.gRate.Location = new System.Drawing.Point(101, 99); this.gRate.Name = "gRate"; this.gRate.Size = new System.Drawing.Size(59, 20); - this.gRate.TabIndex = 21; + this.gRate.TabIndex = 6; this.gRate.Text = "44100"; this.tt.SetToolTip(this.gRate, "The sample rate to stream at (same for both MP3 and OGG)\r\n (internet and CD st" + "andard is 44100)"); @@ -442,63 +467,287 @@ private void InitializeComponent() this.gRate.MouseEnter += new System.EventHandler(this.gHost_MouseEnter); this.gRate.MouseLeave += new System.EventHandler(this.gHost_MouseLeave); // - // pMp3 + // gAutoconn + // + this.gAutoconn.AutoSize = true; + this.gAutoconn.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gAutoconn.Location = new System.Drawing.Point(340, 184); + this.gAutoconn.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gAutoconn.Name = "gAutoconn"; + this.gAutoconn.Size = new System.Drawing.Size(141, 17); + this.gAutoconn.TabIndex = 10; + this.gAutoconn.Text = "On startup, autoconnect"; + this.tt.SetToolTip(this.gAutoconn, "Connect to radio server on startup"); + this.gAutoconn.UseVisualStyleBackColor = true; + this.gAutoconn.CheckedChanged += new System.EventHandler(this.gAutoconn_CheckedChanged); + // + // gUnavail + // + this.gUnavail.AutoSize = true; + this.gUnavail.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gUnavail.Location = new System.Drawing.Point(101, 184); + this.gUnavail.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gUnavail.Name = "gUnavail"; + this.gUnavail.Size = new System.Drawing.Size(150, 17); + this.gUnavail.TabIndex = 8; + this.gUnavail.Text = "Show unavailable devices"; + this.tt.SetToolTip(this.gUnavail, "When listing devices in dropdowns,\r\nalso include those that are disabled."); + this.gUnavail.UseVisualStyleBackColor = true; + this.gUnavail.CheckedChanged += new System.EventHandler(this.gUnavail_CheckedChanged); + // + // gTestDevs + // + this.gTestDevs.AutoSize = true; + this.gTestDevs.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gTestDevs.Checked = true; + this.gTestDevs.CheckState = System.Windows.Forms.CheckState.Checked; + this.gTestDevs.Location = new System.Drawing.Point(101, 148); + this.gTestDevs.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gTestDevs.Name = "gTestDevs"; + this.gTestDevs.Size = new System.Drawing.Size(205, 30); + this.gTestDevs.TabIndex = 7; + this.gTestDevs.Text = "Run all sound device tests on startup\r\n(theoretical crash on some computers)"; + this.tt.SetToolTip(this.gTestDevs, "Check which audio devices that are usable on startup.\r\nSome soundcards could caus" + + "e unhandled exceptions."); + this.gTestDevs.UseVisualStyleBackColor = true; + this.gTestDevs.CheckedChanged += new System.EventHandler(this.gTestDevs_CheckedChanged); + // + // tpServer + // + this.tpServer.BackColor = System.Drawing.SystemColors.Control; + this.tpServer.Controls.Add(this.label25); + this.tpServer.Controls.Add(this.gPublic); + this.tpServer.Controls.Add(this.label15); + this.tpServer.Controls.Add(this.label14); + this.tpServer.Controls.Add(this.label13); + this.tpServer.Controls.Add(this.label11); + this.tpServer.Controls.Add(this.gURL); + this.tpServer.Controls.Add(this.gTitle); + this.tpServer.Controls.Add(this.gGenre); + this.tpServer.Controls.Add(this.gDescription); + this.tpServer.Controls.Add(this.gSiren); + this.tpServer.Controls.Add(this.gHost); + this.tpServer.Controls.Add(this.gIce); + this.tpServer.Controls.Add(this.label4); + this.tpServer.Controls.Add(this.gShout); + this.tpServer.Controls.Add(this.gMount); + this.tpServer.Controls.Add(this.label6); + this.tpServer.Controls.Add(this.gPass); + this.tpServer.Controls.Add(this.label7); + this.tpServer.Location = new System.Drawing.Point(4, 25); + this.tpServer.Name = "tpServer"; + this.tpServer.Padding = new System.Windows.Forms.Padding(3); + this.tpServer.Size = new System.Drawing.Size(534, 275); + this.tpServer.TabIndex = 1; + this.tpServer.Text = "Server"; + // + // gPublic + // + this.gPublic.AutoSize = true; + this.gPublic.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gPublic.Location = new System.Drawing.Point(293, 140); + this.gPublic.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gPublic.Name = "gPublic"; + this.gPublic.Size = new System.Drawing.Size(224, 17); + this.gPublic.TabIndex = 22; + this.gPublic.Text = "Public stream (announce in Yellow Pages)"; + this.tt.SetToolTip(this.gPublic, "Hide after startup sequence"); + this.gPublic.UseVisualStyleBackColor = true; + this.gPublic.CheckedChanged += new System.EventHandler(this.gPublic_CheckedChanged); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(21, 192); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(60, 13); + this.label15.TabIndex = 53; + this.label15.Text = "Description"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(21, 244); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(29, 13); + this.label14.TabIndex = 52; + this.label14.Text = "URL"; // - this.pMp3.Controls.Add(this.gMp3Stereo); - this.pMp3.Controls.Add(this.gMp3Enable); - this.pMp3.Controls.Add(this.gMp3Mono); - this.pMp3.Controls.Add(this.groupBox1); - this.pMp3.Location = new System.Drawing.Point(94, 124); - this.pMp3.Name = "pMp3"; - this.pMp3.Size = new System.Drawing.Size(139, 140); - this.pMp3.TabIndex = 42; + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(21, 218); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(36, 13); + this.label13.TabIndex = 51; + this.label13.Text = "Genre"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(21, 166); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(27, 13); + this.label11.TabIndex = 50; + this.label11.Text = "Title"; + // + // gURL + // + this.gURL.Location = new System.Drawing.Point(101, 241); + this.gURL.Name = "gURL"; + this.gURL.Size = new System.Drawing.Size(409, 20); + this.gURL.TabIndex = 21; + this.gURL.Text = "https://github.com/9001/loopstream"; + this.gURL.TextChanged += new System.EventHandler(this.gURL_TextChanged); + // + // gTitle + // + this.gTitle.Location = new System.Drawing.Point(101, 163); + this.gTitle.Name = "gTitle"; + this.gTitle.Size = new System.Drawing.Size(409, 20); + this.gTitle.TabIndex = 18; + this.gTitle.Text = "Loopstream"; + this.gTitle.TextChanged += new System.EventHandler(this.gTitle_TextChanged); + // + // gGenre + // + this.gGenre.Location = new System.Drawing.Point(101, 215); + this.gGenre.Name = "gGenre"; + this.gGenre.Size = new System.Drawing.Size(409, 20); + this.gGenre.TabIndex = 20; + this.gGenre.Text = "Post-Avant Jazzcore"; + this.gGenre.TextChanged += new System.EventHandler(this.gGenre_TextChanged); + // + // gDescription + // + this.gDescription.Location = new System.Drawing.Point(101, 189); + this.gDescription.Name = "gDescription"; + this.gDescription.Size = new System.Drawing.Size(409, 20); + this.gDescription.TabIndex = 19; + this.gDescription.Text = "Cave Explorer Committee"; + this.gDescription.TextChanged += new System.EventHandler(this.gDescription_TextChanged); + // + // tpEncoders + // + this.tpEncoders.BackColor = System.Drawing.SystemColors.Control; + this.tpEncoders.Controls.Add(this.gMp3Stereo); + this.tpEncoders.Controls.Add(this.gOggStereo); + this.tpEncoders.Controls.Add(this.gMp3Enable); + this.tpEncoders.Controls.Add(this.gRecOGG); + this.tpEncoders.Controls.Add(this.gMp3Mono); + this.tpEncoders.Controls.Add(this.gOggEnable); + this.tpEncoders.Controls.Add(this.gRecMP3); + this.tpEncoders.Controls.Add(this.groupBox1); + this.tpEncoders.Controls.Add(this.groupBox2); + this.tpEncoders.Controls.Add(this.gOggMono); + this.tpEncoders.Location = new System.Drawing.Point(4, 25); + this.tpEncoders.Name = "tpEncoders"; + this.tpEncoders.Size = new System.Drawing.Size(534, 275); + this.tpEncoders.TabIndex = 2; + this.tpEncoders.Text = "Encoders"; // // gMp3Stereo // this.gMp3Stereo.AutoSize = true; this.gMp3Stereo.Checked = true; - this.gMp3Stereo.Location = new System.Drawing.Point(74, 118); + this.gMp3Stereo.Location = new System.Drawing.Point(91, 159); this.gMp3Stereo.Name = "gMp3Stereo"; this.gMp3Stereo.Size = new System.Drawing.Size(56, 17); - this.gMp3Stereo.TabIndex = 26; + this.gMp3Stereo.TabIndex = 30; this.gMp3Stereo.TabStop = true; this.gMp3Stereo.Text = "Stereo"; this.tt.SetToolTip(this.gMp3Stereo, "Stream using 2 audio channels (stereo)"); this.gMp3Stereo.UseVisualStyleBackColor = true; this.gMp3Stereo.CheckedChanged += new System.EventHandler(this.gMp3Stereo_CheckedChanged); // + // gOggStereo + // + this.gOggStereo.AutoSize = true; + this.gOggStereo.Checked = true; + this.gOggStereo.Location = new System.Drawing.Point(280, 159); + this.gOggStereo.Name = "gOggStereo"; + this.gOggStereo.Size = new System.Drawing.Size(56, 17); + this.gOggStereo.TabIndex = 38; + this.gOggStereo.TabStop = true; + this.gOggStereo.Text = "Stereo"; + this.tt.SetToolTip(this.gOggStereo, "Stream using 2 audio channels (stereo)"); + this.gOggStereo.UseVisualStyleBackColor = true; + this.gOggStereo.CheckedChanged += new System.EventHandler(this.gOggStereo_CheckedChanged); + // // gMp3Enable // this.gMp3Enable.AutoSize = true; - this.gMp3Enable.Location = new System.Drawing.Point(7, 3); + this.gMp3Enable.Location = new System.Drawing.Point(23, 20); this.gMp3Enable.Name = "gMp3Enable"; - this.gMp3Enable.Size = new System.Drawing.Size(65, 17); - this.gMp3Enable.TabIndex = 40; - this.gMp3Enable.Text = "Enabled"; + this.gMp3Enable.Size = new System.Drawing.Size(84, 17); + this.gMp3Enable.TabIndex = 23; + this.gMp3Enable.Text = "MP3 Stream"; this.tt.SetToolTip(this.gMp3Enable, "Transmit an MP3-encoded stream"); this.gMp3Enable.UseVisualStyleBackColor = true; this.gMp3Enable.CheckedChanged += new System.EventHandler(this.gMp3Enable_CheckedChanged); // + // gRecOGG + // + this.gRecOGG.AutoSize = true; + this.gRecOGG.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gRecOGG.Location = new System.Drawing.Point(212, 43); + this.gRecOGG.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gRecOGG.Name = "gRecOGG"; + this.gRecOGG.Size = new System.Drawing.Size(88, 17); + this.gRecOGG.TabIndex = 32; + this.gRecOGG.Text = "OGG Record"; + this.tt.SetToolTip(this.gRecOGG, "Record a copy of your streams as OGG/Vorbis"); + this.gRecOGG.UseVisualStyleBackColor = true; + this.gRecOGG.CheckedChanged += new System.EventHandler(this.gRecOGG_CheckedChanged); + // // gMp3Mono // this.gMp3Mono.AutoSize = true; - this.gMp3Mono.Location = new System.Drawing.Point(6, 118); + this.gMp3Mono.Location = new System.Drawing.Point(23, 159); this.gMp3Mono.Name = "gMp3Mono"; this.gMp3Mono.Size = new System.Drawing.Size(52, 17); - this.gMp3Mono.TabIndex = 25; + this.gMp3Mono.TabIndex = 29; this.gMp3Mono.Text = "Mono"; this.tt.SetToolTip(this.gMp3Mono, "Stream using 1 audio channel (mono)\r\n (there is really no need to choose this)" + ""); this.gMp3Mono.UseVisualStyleBackColor = true; this.gMp3Mono.CheckedChanged += new System.EventHandler(this.gMp3Mono_CheckedChanged); // + // gOggEnable + // + this.gOggEnable.AutoSize = true; + this.gOggEnable.Location = new System.Drawing.Point(212, 20); + this.gOggEnable.Name = "gOggEnable"; + this.gOggEnable.Size = new System.Drawing.Size(86, 17); + this.gOggEnable.TabIndex = 31; + this.gOggEnable.Text = "OGG Stream"; + this.tt.SetToolTip(this.gOggEnable, "Transmit an OGG/Vorbis-encoded stream"); + this.gOggEnable.UseVisualStyleBackColor = true; + this.gOggEnable.CheckedChanged += new System.EventHandler(this.gOggEnable_CheckedChanged); + // + // gRecMP3 + // + this.gRecMP3.AutoSize = true; + this.gRecMP3.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.gRecMP3.Checked = true; + this.gRecMP3.CheckState = System.Windows.Forms.CheckState.Checked; + this.gRecMP3.Location = new System.Drawing.Point(23, 43); + this.gRecMP3.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); + this.gRecMP3.Name = "gRecMP3"; + this.gRecMP3.Size = new System.Drawing.Size(86, 17); + this.gRecMP3.TabIndex = 24; + this.gRecMP3.Text = "MP3 Record"; + this.tt.SetToolTip(this.gRecMP3, "Record a copy of your streams as MP3"); + this.gRecMP3.UseVisualStyleBackColor = true; + this.gRecMP3.CheckedChanged += new System.EventHandler(this.gRecMP3_CheckedChanged); + // // groupBox1 // this.groupBox1.Controls.Add(this.gMp3BitrateV); this.groupBox1.Controls.Add(this.gMp3Quality); this.groupBox1.Controls.Add(this.gMp3QualityV); this.groupBox1.Controls.Add(this.gMp3Bitrate); - this.groupBox1.Location = new System.Drawing.Point(0, 32); + this.groupBox1.Location = new System.Drawing.Point(17, 73); this.groupBox1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 8); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(139, 71); @@ -511,7 +760,7 @@ private void InitializeComponent() this.gMp3BitrateV.Location = new System.Drawing.Point(74, 19); this.gMp3BitrateV.Name = "gMp3BitrateV"; this.gMp3BitrateV.Size = new System.Drawing.Size(59, 20); - this.gMp3BitrateV.TabIndex = 21; + this.gMp3BitrateV.TabIndex = 27; this.gMp3BitrateV.Text = "192"; this.tt.SetToolTip(this.gMp3BitrateV, "The bitrate to stream at (128 or 192 recommended)"); this.gMp3BitrateV.TextChanged += new System.EventHandler(this.gMp3BitrateV_TextChanged); @@ -524,7 +773,7 @@ private void InitializeComponent() this.gMp3Quality.Location = new System.Drawing.Point(6, 46); this.gMp3Quality.Name = "gMp3Quality"; this.gMp3Quality.Size = new System.Drawing.Size(57, 17); - this.gMp3Quality.TabIndex = 25; + this.gMp3Quality.TabIndex = 26; this.gMp3Quality.Text = "Quality"; this.tt.SetToolTip(this.gMp3Quality, "Stream MP3 using constant bitrate (NOT recommended)\r\n (some players will have " + "problems with speedup/down)"); @@ -536,7 +785,7 @@ private void InitializeComponent() this.gMp3QualityV.Location = new System.Drawing.Point(74, 45); this.gMp3QualityV.Name = "gMp3QualityV"; this.gMp3QualityV.Size = new System.Drawing.Size(59, 20); - this.gMp3QualityV.TabIndex = 23; + this.gMp3QualityV.TabIndex = 28; this.gMp3QualityV.Text = "5"; this.tt.SetToolTip(this.gMp3QualityV, "The quality to stream at (LOWER is better/bigger)"); this.gMp3QualityV.TextChanged += new System.EventHandler(this.gMp3QualityV_TextChanged); @@ -550,7 +799,7 @@ private void InitializeComponent() this.gMp3Bitrate.Location = new System.Drawing.Point(6, 20); this.gMp3Bitrate.Name = "gMp3Bitrate"; this.gMp3Bitrate.Size = new System.Drawing.Size(55, 17); - this.gMp3Bitrate.TabIndex = 24; + this.gMp3Bitrate.TabIndex = 25; this.gMp3Bitrate.TabStop = true; this.gMp3Bitrate.Text = "Bitrate"; this.tt.SetToolTip(this.gMp3Bitrate, "Stream MP3 using constant bitrate (recommended)\r\n (works in every single media" + @@ -558,38 +807,13 @@ private void InitializeComponent() this.gMp3Bitrate.UseVisualStyleBackColor = true; this.gMp3Bitrate.CheckedChanged += new System.EventHandler(this.gMp3Bitrate_CheckedChanged); // - // pOgg - // - this.pOgg.Controls.Add(this.gOggStereo); - this.pOgg.Controls.Add(this.groupBox2); - this.pOgg.Controls.Add(this.gOggMono); - this.pOgg.Controls.Add(this.gOggEnable); - this.pOgg.Location = new System.Drawing.Point(94, 124); - this.pOgg.Name = "pOgg"; - this.pOgg.Size = new System.Drawing.Size(139, 140); - this.pOgg.TabIndex = 42; - // - // gOggStereo - // - this.gOggStereo.AutoSize = true; - this.gOggStereo.Checked = true; - this.gOggStereo.Location = new System.Drawing.Point(74, 118); - this.gOggStereo.Name = "gOggStereo"; - this.gOggStereo.Size = new System.Drawing.Size(56, 17); - this.gOggStereo.TabIndex = 45; - this.gOggStereo.TabStop = true; - this.gOggStereo.Text = "Stereo"; - this.tt.SetToolTip(this.gOggStereo, "Stream using 2 audio channels (stereo)"); - this.gOggStereo.UseVisualStyleBackColor = true; - this.gOggStereo.CheckedChanged += new System.EventHandler(this.gOggStereo_CheckedChanged); - // // groupBox2 // this.groupBox2.Controls.Add(this.gOggBitrateV); this.groupBox2.Controls.Add(this.gOggQuality); this.groupBox2.Controls.Add(this.gOggQualityV); this.groupBox2.Controls.Add(this.gOggBitrate); - this.groupBox2.Location = new System.Drawing.Point(0, 32); + this.groupBox2.Location = new System.Drawing.Point(206, 73); this.groupBox2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 8); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(139, 71); @@ -602,7 +826,7 @@ private void InitializeComponent() this.gOggBitrateV.Location = new System.Drawing.Point(74, 19); this.gOggBitrateV.Name = "gOggBitrateV"; this.gOggBitrateV.Size = new System.Drawing.Size(59, 20); - this.gOggBitrateV.TabIndex = 21; + this.gOggBitrateV.TabIndex = 35; this.gOggBitrateV.Text = "192"; this.tt.SetToolTip(this.gOggBitrateV, "The bitrate to stream at (128, 160 or 192 recommended)"); this.gOggBitrateV.TextChanged += new System.EventHandler(this.gOggBitrateV_TextChanged); @@ -615,7 +839,7 @@ private void InitializeComponent() this.gOggQuality.Location = new System.Drawing.Point(6, 46); this.gOggQuality.Name = "gOggQuality"; this.gOggQuality.Size = new System.Drawing.Size(57, 17); - this.gOggQuality.TabIndex = 25; + this.gOggQuality.TabIndex = 34; this.gOggQuality.Text = "Quality"; this.tt.SetToolTip(this.gOggQuality, "Stream OGG using constant bitrate (recommended)\r\n (superb dynamic sound qualit" + "y at small sizes)"); @@ -627,7 +851,7 @@ private void InitializeComponent() this.gOggQualityV.Location = new System.Drawing.Point(74, 45); this.gOggQualityV.Name = "gOggQualityV"; this.gOggQualityV.Size = new System.Drawing.Size(59, 20); - this.gOggQualityV.TabIndex = 23; + this.gOggQualityV.TabIndex = 36; this.gOggQualityV.Text = "5"; this.tt.SetToolTip(this.gOggQualityV, "The quality to stream at (HIGHER is better/bigger)"); this.gOggQualityV.TextChanged += new System.EventHandler(this.gOggQualityV_TextChanged); @@ -641,7 +865,7 @@ private void InitializeComponent() this.gOggBitrate.Location = new System.Drawing.Point(6, 20); this.gOggBitrate.Name = "gOggBitrate"; this.gOggBitrate.Size = new System.Drawing.Size(55, 17); - this.gOggBitrate.TabIndex = 24; + this.gOggBitrate.TabIndex = 33; this.gOggBitrate.TabStop = true; this.gOggBitrate.Text = "Bitrate"; this.tt.SetToolTip(this.gOggBitrate, "Stream OGG using constant bitrate (NOT recommended)\r\n (slow AND poor sound qua" + @@ -652,44 +876,370 @@ private void InitializeComponent() // gOggMono // this.gOggMono.AutoSize = true; - this.gOggMono.Location = new System.Drawing.Point(6, 118); + this.gOggMono.Location = new System.Drawing.Point(212, 159); this.gOggMono.Name = "gOggMono"; this.gOggMono.Size = new System.Drawing.Size(52, 17); - this.gOggMono.TabIndex = 44; + this.gOggMono.TabIndex = 37; this.gOggMono.Text = "Mono"; this.tt.SetToolTip(this.gOggMono, "Stream using 1 audio channel (mono)\r\n (there is really no need to choose this)" + ""); this.gOggMono.UseVisualStyleBackColor = true; this.gOggMono.CheckedChanged += new System.EventHandler(this.gOggMono_CheckedChanged); // - // gOggEnable + // tpTags + // + this.tpTags.BackColor = System.Drawing.SystemColors.Control; + this.tpTags.Controls.Add(this.gMeta); + this.tpTags.Controls.Add(this.label16); + this.tpTags.Controls.Add(this.gTagsAdvanced); + this.tpTags.Controls.Add(this.pTagsAdvanced2); + this.tpTags.Controls.Add(this.pTagAdvanced1); + this.tpTags.Location = new System.Drawing.Point(4, 25); + this.tpTags.Name = "tpTags"; + this.tpTags.Size = new System.Drawing.Size(534, 275); + this.tpTags.TabIndex = 3; + this.tpTags.Text = "Tags"; + // + // gMeta + // + this.gMeta.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.gMeta.FormattingEnabled = true; + this.gMeta.Location = new System.Drawing.Point(24, 37); + this.gMeta.Name = "gMeta"; + this.gMeta.Size = new System.Drawing.Size(305, 21); + this.gMeta.TabIndex = 39; + this.tt.SetToolTip(this.gMeta, "These are all the media players that Loopstream has built-in support for.\r\nIf you" + + " can\'t find yours, ask an adult to fill in the [Advanced] config!"); + this.gMeta.SelectedIndexChanged += new System.EventHandler(this.gMeta_SelectedIndexChanged); + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(22, 21); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(173, 13); + this.label16.TabIndex = 36; + this.label16.Text = "Choose a media player from the list:"; + // + // gTagsAdvanced + // + this.gTagsAdvanced.Location = new System.Drawing.Point(333, 36); + this.gTagsAdvanced.Name = "gTagsAdvanced"; + this.gTagsAdvanced.Size = new System.Drawing.Size(118, 23); + this.gTagsAdvanced.TabIndex = 40; + this.gTagsAdvanced.Text = "Advanced"; + this.tt.SetToolTip(this.gTagsAdvanced, "Only for burly men with hair on their chest."); + this.gTagsAdvanced.UseVisualStyleBackColor = true; + this.gTagsAdvanced.Click += new System.EventHandler(this.gTagsAdvanced_Click); + // + // pTagsAdvanced2 + // + this.pTagsAdvanced2.Controls.Add(this.gDelete); + this.pTagsAdvanced2.Controls.Add(this.gLatinize); + this.pTagsAdvanced2.Dock = System.Windows.Forms.DockStyle.Right; + this.pTagsAdvanced2.Location = new System.Drawing.Point(332, 0); + this.pTagsAdvanced2.Name = "pTagsAdvanced2"; + this.pTagsAdvanced2.Size = new System.Drawing.Size(202, 71); + this.pTagsAdvanced2.TabIndex = 64; + this.pTagsAdvanced2.Visible = false; + // + // gDelete + // + this.gDelete.Location = new System.Drawing.Point(1, 36); + this.gDelete.Name = "gDelete"; + this.gDelete.Size = new System.Drawing.Size(118, 23); + this.gDelete.TabIndex = 46; + this.gDelete.Text = "Delete this preset"; + this.gDelete.UseVisualStyleBackColor = true; + // + // gLatinize + // + this.gLatinize.AutoSize = true; + this.gLatinize.Location = new System.Drawing.Point(3, 19); + this.gLatinize.Name = "gLatinize"; + this.gLatinize.Size = new System.Drawing.Size(118, 17); + this.gLatinize.TabIndex = 62; + this.gLatinize.Text = "Wrap tags in Latin1"; + this.tt.SetToolTip(this.gLatinize, "Mogrify the tags into Latin1 (fake-utf8) before sending to icecast.\r\nSurprisingly" + + ", you usually /want/ to do this.\r\nStupid nullsoft and their antics."); + this.gLatinize.UseVisualStyleBackColor = true; + this.gLatinize.CheckedChanged += new System.EventHandler(this.gLatinize_CheckedChanged); + // + // pTagAdvanced1 + // + this.pTagAdvanced1.BackColor = System.Drawing.SystemColors.Control; + this.pTagAdvanced1.Controls.Add(this.gGroup); + this.pTagAdvanced1.Controls.Add(this.label17); + this.pTagAdvanced1.Controls.Add(this.gEncodingL); + this.pTagAdvanced1.Controls.Add(this.label24); + this.pTagAdvanced1.Controls.Add(this.gResult); + this.pTagAdvanced1.Controls.Add(this.label18); + this.pTagAdvanced1.Controls.Add(this.gEncoding); + this.pTagAdvanced1.Controls.Add(this.gReader); + this.pTagAdvanced1.Controls.Add(this.label19); + this.pTagAdvanced1.Controls.Add(this.gTest); + this.pTagAdvanced1.Controls.Add(this.gFreq); + this.pTagAdvanced1.Controls.Add(this.label20); + this.pTagAdvanced1.Controls.Add(this.gReload); + this.pTagAdvanced1.Controls.Add(this.label22); + this.pTagAdvanced1.Controls.Add(this.label28); + this.pTagAdvanced1.Controls.Add(this.gPattern); + this.pTagAdvanced1.Controls.Add(this.label23); + this.pTagAdvanced1.Controls.Add(this.label21); + this.pTagAdvanced1.Controls.Add(this.gStore); + this.pTagAdvanced1.Controls.Add(this.gSource); + this.pTagAdvanced1.Controls.Add(this.gName); + this.pTagAdvanced1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pTagAdvanced1.Location = new System.Drawing.Point(0, 71); + this.pTagAdvanced1.Name = "pTagAdvanced1"; + this.pTagAdvanced1.Size = new System.Drawing.Size(534, 204); + this.pTagAdvanced1.TabIndex = 63; + this.pTagAdvanced1.Visible = false; + // + // label17 + // + this.label17.BackColor = System.Drawing.SystemColors.ButtonShadow; + this.label17.Dock = System.Windows.Forms.DockStyle.Top; + this.label17.Location = new System.Drawing.Point(0, 1); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(534, 1); + this.label17.TabIndex = 63; + // + // gEncodingL + // + this.gEncodingL.AutoSize = true; + this.gEncodingL.Location = new System.Drawing.Point(19, 173); + this.gEncodingL.Name = "gEncodingL"; + this.gEncodingL.Size = new System.Drawing.Size(52, 13); + this.gEncodingL.TabIndex = 61; + this.gEncodingL.Text = "Encoding"; + this.gEncodingL.Visible = false; + // + // label24 + // + this.label24.BackColor = System.Drawing.SystemColors.ButtonHighlight; + this.label24.Dock = System.Windows.Forms.DockStyle.Top; + this.label24.Location = new System.Drawing.Point(0, 0); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(534, 1); + this.label24.TabIndex = 64; + // + // gResult + // + this.gResult.AutoSize = true; + this.gResult.Location = new System.Drawing.Point(20, 18); + this.gResult.Name = "gResult"; + this.gResult.Size = new System.Drawing.Size(206, 13); + this.gResult.TabIndex = 37; + this.gResult.Text = "Optionally, fill in the specification manually:"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(19, 43); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(42, 13); + this.label18.TabIndex = 39; + this.label18.Text = "Reader"; + // + // gEncoding + // + this.gEncoding.Location = new System.Drawing.Point(100, 170); + this.gEncoding.Name = "gEncoding"; + this.gEncoding.Size = new System.Drawing.Size(100, 20); + this.gEncoding.TabIndex = 50; + this.tt.SetToolTip(this.gEncoding, "Which character encoding to use when decoding bytes"); + this.gEncoding.Visible = false; + this.gEncoding.TextChanged += new System.EventHandler(this.gEncoding_TextChanged); + this.gEncoding.MouseEnter += new System.EventHandler(this.gHost_MouseEnter); + this.gEncoding.MouseLeave += new System.EventHandler(this.gHost_MouseLeave); + // + // gReader + // + this.gReader.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.gReader.FormattingEnabled = true; + this.gReader.Location = new System.Drawing.Point(100, 39); + this.gReader.Margin = new System.Windows.Forms.Padding(3, 8, 3, 3); + this.gReader.Name = "gReader"; + this.gReader.Size = new System.Drawing.Size(227, 21); + this.gReader.TabIndex = 41; + this.tt.SetToolTip(this.gReader, "The method that Loopstream will use to aquire the Now Playing data"); + this.gReader.SelectedIndexChanged += new System.EventHandler(this.gReader_SelectedIndexChanged); + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(19, 121); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(57, 13); + this.label19.TabIndex = 41; + this.label19.Text = "Frequency"; + // + // gTest + // + this.gTest.AutoSize = true; + this.gTest.Location = new System.Drawing.Point(456, 68); + this.gTest.Name = "gTest"; + this.gTest.Size = new System.Drawing.Size(47, 17); + this.gTest.TabIndex = 44; + this.gTest.Text = "Test"; + this.tt.SetToolTip(this.gTest, "Immediately display what your Pattern does"); + this.gTest.UseVisualStyleBackColor = true; + this.gTest.CheckedChanged += new System.EventHandler(this.gTest_CheckedChanged); + // + // gFreq + // + this.gFreq.Location = new System.Drawing.Point(100, 118); + this.gFreq.Name = "gFreq"; + this.gFreq.Size = new System.Drawing.Size(100, 20); + this.gFreq.TabIndex = 47; + this.tt.SetToolTip(this.gFreq, "How often Loopstream will look for new metadata (in miliseconds)"); + this.gFreq.TextChanged += new System.EventHandler(this.gFreq_TextChanged); + this.gFreq.MouseEnter += new System.EventHandler(this.gHost_MouseEnter); + this.gFreq.MouseLeave += new System.EventHandler(this.gHost_MouseLeave); + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(206, 121); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(61, 13); + this.label20.TabIndex = 43; + this.label20.Text = "miliseconds"; + // + // gReload + // + this.gReload.Location = new System.Drawing.Point(333, 65); + this.gReload.Name = "gReload"; + this.gReload.Size = new System.Drawing.Size(118, 22); + this.gReload.TabIndex = 43; + this.gReload.Text = "Reload to memory"; + this.tt.SetToolTip(this.gReload, "Reload buffered metadata for testing"); + this.gReload.UseVisualStyleBackColor = true; + this.gReload.Click += new System.EventHandler(this.gReload_Click); + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(19, 95); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(41, 13); + this.label22.TabIndex = 44; + this.label22.Text = "Pattern"; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(453, 147); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(50, 13); + this.label28.TabIndex = 57; + this.label28.Text = "(optional)"; + // + // gPattern + // + this.gPattern.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gPattern.Location = new System.Drawing.Point(128, 92); + this.gPattern.Name = "gPattern"; + this.gPattern.Size = new System.Drawing.Size(398, 20); + this.gPattern.TabIndex = 46; + this.tt.SetToolTip(this.gPattern, "The Regex pattern that will be used to extract the Artist and Title\r\nAlternativel" + + "y, memory addresses when using the ProcMem Reader"); + this.gPattern.TextChanged += new System.EventHandler(this.gPattern_TextChanged); + this.gPattern.MouseEnter += new System.EventHandler(this.gHost_MouseEnter); + this.gPattern.MouseLeave += new System.EventHandler(this.gHost_MouseLeave); + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(19, 147); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(27, 13); + this.label23.TabIndex = 52; + this.label23.Text = "Title"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(19, 69); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(41, 13); + this.label21.TabIndex = 47; + this.label21.Text = "Source"; + // + // gStore + // + this.gStore.Location = new System.Drawing.Point(333, 143); + this.gStore.Name = "gStore"; + this.gStore.Size = new System.Drawing.Size(118, 22); + this.gStore.TabIndex = 49; + this.gStore.Text = "Save as preset"; + this.tt.SetToolTip(this.gStore, "Save this config as a new preset"); + this.gStore.UseVisualStyleBackColor = true; + this.gStore.Click += new System.EventHandler(this.gStore_Click); + // + // gSource + // + this.gSource.Location = new System.Drawing.Point(100, 66); + this.gSource.Name = "gSource"; + this.gSource.Size = new System.Drawing.Size(227, 20); + this.gSource.TabIndex = 42; + this.tt.SetToolTip(this.gSource, "Where LoopStream will get the Now Playing data from"); + this.gSource.TextChanged += new System.EventHandler(this.gSource_TextChanged); + this.gSource.MouseEnter += new System.EventHandler(this.gHost_MouseEnter); + this.gSource.MouseLeave += new System.EventHandler(this.gHost_MouseLeave); + // + // gName + // + this.gName.Location = new System.Drawing.Point(100, 144); + this.gName.Name = "gName"; + this.gName.Size = new System.Drawing.Size(227, 20); + this.gName.TabIndex = 48; + this.tt.SetToolTip(this.gName, "A title you\'d like to use for this config"); + this.gName.TextChanged += new System.EventHandler(this.gName_TextChanged); + this.gName.MouseEnter += new System.EventHandler(this.gHost_MouseEnter); + this.gName.MouseLeave += new System.EventHandler(this.gHost_MouseLeave); + // + // pFooter + // + this.pFooter.BackColor = System.Drawing.SystemColors.ControlLight; + this.pFooter.Controls.Add(this.pButtons); + this.pFooter.Controls.Add(this.label1); + this.pFooter.Controls.Add(this.label2); + this.pFooter.Controls.Add(this.gSplash); + this.pFooter.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pFooter.Location = new System.Drawing.Point(0, 321); + this.pFooter.Name = "pFooter"; + this.pFooter.Size = new System.Drawing.Size(542, 67); + this.pFooter.TabIndex = 39; + // + // pButtons + // + this.pButtons.Controls.Add(this.gCancel); + this.pButtons.Controls.Add(this.gSave); + this.pButtons.Dock = System.Windows.Forms.DockStyle.Right; + this.pButtons.Location = new System.Drawing.Point(239, 2); + this.pButtons.Name = "pButtons"; + this.pButtons.Size = new System.Drawing.Size(303, 65); + this.pButtons.TabIndex = 41; // - this.gOggEnable.AutoSize = true; - this.gOggEnable.Location = new System.Drawing.Point(74, 3); - this.gOggEnable.Name = "gOggEnable"; - this.gOggEnable.Size = new System.Drawing.Size(65, 17); - this.gOggEnable.TabIndex = 43; - this.gOggEnable.Text = "Enabled"; - this.tt.SetToolTip(this.gOggEnable, "Transmit an OGG/Vorbis-encoded stream"); - this.gOggEnable.UseVisualStyleBackColor = true; - this.gOggEnable.CheckedChanged += new System.EventHandler(this.gOggEnable_CheckedChanged); + // label1 // - // gTestDevs + this.label1.BackColor = System.Drawing.SystemColors.ButtonShadow; + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Location = new System.Drawing.Point(0, 1); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(542, 1); + this.label1.TabIndex = 39; // - this.gTestDevs.AutoSize = true; - this.gTestDevs.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.gTestDevs.Checked = true; - this.gTestDevs.CheckState = System.Windows.Forms.CheckState.Checked; - this.gTestDevs.Location = new System.Drawing.Point(557, 12); - this.gTestDevs.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); - this.gTestDevs.Name = "gTestDevs"; - this.gTestDevs.Size = new System.Drawing.Size(205, 30); - this.gTestDevs.TabIndex = 38; - this.gTestDevs.Text = "Run all sound device tests on startup\r\n(theoretical crash on some computers)"; - this.tt.SetToolTip(this.gTestDevs, "Check which audio devices that are usable on startup.\r\nSome soundcards could caus" + - "e unhandled exceptions."); - this.gTestDevs.UseVisualStyleBackColor = true; - this.gTestDevs.CheckedChanged += new System.EventHandler(this.gTestDevs_CheckedChanged); + // label2 + // + this.label2.BackColor = System.Drawing.SystemColors.ButtonHighlight; + this.label2.Dock = System.Windows.Forms.DockStyle.Top; + this.label2.Location = new System.Drawing.Point(0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(542, 1); + this.label2.TabIndex = 40; // // gSplash // @@ -697,101 +1247,47 @@ private void InitializeComponent() this.gSplash.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.gSplash.Checked = true; this.gSplash.CheckState = System.Windows.Forms.CheckState.Checked; - this.gSplash.Location = new System.Drawing.Point(557, 71); + this.gSplash.Location = new System.Drawing.Point(12, 24); this.gSplash.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); this.gSplash.Name = "gSplash"; this.gSplash.Size = new System.Drawing.Size(167, 17); - this.gSplash.TabIndex = 39; + this.gSplash.TabIndex = 51; this.gSplash.Text = "Splash screen fadeout effects"; this.tt.SetToolTip(this.gSplash, "420 lensflare bling"); this.gSplash.UseVisualStyleBackColor = true; this.gSplash.CheckedChanged += new System.EventHandler(this.gSplash_CheckedChanged); // - // gRecMP3 - // - this.gRecMP3.AutoSize = true; - this.gRecMP3.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.gRecMP3.Checked = true; - this.gRecMP3.CheckState = System.Windows.Forms.CheckState.Checked; - this.gRecMP3.Location = new System.Drawing.Point(557, 94); - this.gRecMP3.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); - this.gRecMP3.Name = "gRecMP3"; - this.gRecMP3.Size = new System.Drawing.Size(137, 17); - this.gRecMP3.TabIndex = 40; - this.gRecMP3.Text = "Record streams to MP3"; - this.tt.SetToolTip(this.gRecMP3, "Record a copy of your streams as MP3"); - this.gRecMP3.UseVisualStyleBackColor = true; - this.gRecMP3.CheckedChanged += new System.EventHandler(this.gRecMP3_CheckedChanged); - // - // gRecPCM + // pTabs // - this.gRecPCM.AutoSize = true; - this.gRecPCM.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.gRecPCM.Location = new System.Drawing.Point(557, 140); - this.gRecPCM.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); - this.gRecPCM.Name = "gRecPCM"; - this.gRecPCM.Size = new System.Drawing.Size(138, 17); - this.gRecPCM.TabIndex = 41; - this.gRecPCM.Text = "Record streams to PCM"; - this.tt.SetToolTip(this.gRecPCM, "Record a copy of your streams as raw PCM audio"); - this.gRecPCM.UseVisualStyleBackColor = true; - this.gRecPCM.CheckedChanged += new System.EventHandler(this.gRecPCM_CheckedChanged); - // - // gUnavail - // - this.gUnavail.AutoSize = true; - this.gUnavail.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.gUnavail.Location = new System.Drawing.Point(557, 48); - this.gUnavail.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); - this.gUnavail.Name = "gUnavail"; - this.gUnavail.Size = new System.Drawing.Size(150, 17); - this.gUnavail.TabIndex = 42; - this.gUnavail.Text = "Show unavailable devices"; - this.tt.SetToolTip(this.gUnavail, "When listing devices in dropdowns,\r\nalso include those that are disabled."); - this.gUnavail.UseVisualStyleBackColor = true; - this.gUnavail.CheckedChanged += new System.EventHandler(this.gUnavail_CheckedChanged); - // - // gRecOGG - // - this.gRecOGG.AutoSize = true; - this.gRecOGG.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.gRecOGG.Location = new System.Drawing.Point(557, 117); - this.gRecOGG.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); - this.gRecOGG.Name = "gRecOGG"; - this.gRecOGG.Size = new System.Drawing.Size(139, 17); - this.gRecOGG.TabIndex = 43; - this.gRecOGG.Text = "Record streams to OGG"; - this.tt.SetToolTip(this.gRecOGG, "Record a copy of your streams as OGG/Vorbis"); - this.gRecOGG.UseVisualStyleBackColor = true; - this.gRecOGG.CheckedChanged += new System.EventHandler(this.gRecOGG_CheckedChanged); + this.pTabs.BackColor = System.Drawing.SystemColors.ControlLight; + this.pTabs.Controls.Add(this.label5); + this.pTabs.Controls.Add(this.hTags); + this.pTabs.Controls.Add(this.hEncoders); + this.pTabs.Controls.Add(this.hServer); + this.pTabs.Controls.Add(this.hSoundcard); + this.pTabs.Controls.Add(this.label12); + this.pTabs.Location = new System.Drawing.Point(0, 0); + this.pTabs.Name = "pTabs"; + this.pTabs.Size = new System.Drawing.Size(542, 44); + this.pTabs.TabIndex = 40; // - // gAutoconn + // label5 // - this.gAutoconn.AutoSize = true; - this.gAutoconn.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.gAutoconn.Location = new System.Drawing.Point(557, 163); - this.gAutoconn.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); - this.gAutoconn.Name = "gAutoconn"; - this.gAutoconn.Size = new System.Drawing.Size(141, 17); - this.gAutoconn.TabIndex = 44; - this.gAutoconn.Text = "On startup, autoconnect"; - this.tt.SetToolTip(this.gAutoconn, "Connect to radio server on startup"); - this.gAutoconn.UseVisualStyleBackColor = true; - this.gAutoconn.CheckedChanged += new System.EventHandler(this.gAutoconn_CheckedChanged); + this.label5.BackColor = System.Drawing.SystemColors.ControlDark; + this.label5.Dock = System.Windows.Forms.DockStyle.Bottom; + this.label5.Location = new System.Drawing.Point(0, 33); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(542, 1); + this.label5.TabIndex = 5; // - // gAutohide + // label12 // - this.gAutohide.AutoSize = true; - this.gAutohide.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.gAutohide.Location = new System.Drawing.Point(557, 186); - this.gAutohide.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); - this.gAutohide.Name = "gAutohide"; - this.gAutohide.Size = new System.Drawing.Size(122, 17); - this.gAutohide.TabIndex = 45; - this.gAutohide.Text = "On startup, autohide"; - this.tt.SetToolTip(this.gAutohide, "Hide after startup sequence"); - this.gAutohide.UseVisualStyleBackColor = true; - this.gAutohide.CheckedChanged += new System.EventHandler(this.gAutohide_CheckedChanged); + this.label12.BackColor = System.Drawing.SystemColors.Control; + this.label12.Dock = System.Windows.Forms.DockStyle.Bottom; + this.label12.Location = new System.Drawing.Point(0, 34); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(542, 10); + this.label12.TabIndex = 1; // // tt // @@ -799,40 +1295,115 @@ private void InitializeComponent() this.tt.UseAnimation = false; this.tt.UseFading = false; // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(100, 142); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(94, 13); + this.label25.TabIndex = 55; + this.label25.Text = "Stream information"; + // + // gGroup + // + this.gGroup.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gGroup.Location = new System.Drawing.Point(100, 92); + this.gGroup.Name = "gGroup"; + this.gGroup.Size = new System.Drawing.Size(22, 20); + this.gGroup.TabIndex = 45; + this.gGroup.Text = "1"; + this.tt.SetToolTip(this.gGroup, "Which Regex matching group to keep as \"Artist - Title\""); + this.gGroup.TextChanged += new System.EventHandler(this.gGroup_TextChanged); + // + // hTags + // + this.hTags.AutoSize = true; + this.hTags.BackColor = System.Drawing.SystemColors.ControlLight; + this.hTags.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.hTags.Location = new System.Drawing.Point(277, 0); + this.hTags.Margin = new System.Windows.Forms.Padding(0); + this.hTags.Name = "hTags"; + this.hTags.Padding = new System.Windows.Forms.Padding(14, 15, 14, 0); + this.hTags.Size = new System.Drawing.Size(72, 35); + this.hTags.TabIndex = 4; + this.hTags.Text = "Tags"; + // + // hEncoders + // + this.hEncoders.AutoSize = true; + this.hEncoders.BackColor = System.Drawing.SystemColors.ControlLight; + this.hEncoders.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.hEncoders.Location = new System.Drawing.Point(186, 0); + this.hEncoders.Margin = new System.Windows.Forms.Padding(0); + this.hEncoders.Name = "hEncoders"; + this.hEncoders.Padding = new System.Windows.Forms.Padding(14, 15, 14, 0); + this.hEncoders.Size = new System.Drawing.Size(105, 35); + this.hEncoders.TabIndex = 3; + this.hEncoders.Text = "Encoders"; + // + // hServer + // + this.hServer.AutoSize = true; + this.hServer.BackColor = System.Drawing.SystemColors.ControlLight; + this.hServer.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.hServer.Location = new System.Drawing.Point(117, 0); + this.hServer.Margin = new System.Windows.Forms.Padding(0); + this.hServer.Name = "hServer"; + this.hServer.Padding = new System.Windows.Forms.Padding(14, 15, 14, 0); + this.hServer.Size = new System.Drawing.Size(83, 35); + this.hServer.TabIndex = 2; + this.hServer.Text = "Server"; + // + // hSoundcard + // + this.hSoundcard.AutoSize = true; + this.hSoundcard.BackColor = System.Drawing.SystemColors.ControlLight; + this.hSoundcard.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.hSoundcard.Location = new System.Drawing.Point(16, 0); + this.hSoundcard.Margin = new System.Windows.Forms.Padding(1, 0, 0, 0); + this.hSoundcard.Name = "hSoundcard"; + this.hSoundcard.Padding = new System.Windows.Forms.Padding(14, 15, 14, 0); + this.hSoundcard.Size = new System.Drawing.Size(115, 35); + this.hSoundcard.TabIndex = 0; + this.hSoundcard.Text = "Soundcard"; + // // ConfigSC // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ControlLight; - this.ClientSize = new System.Drawing.Size(777, 319); - this.Controls.Add(this.gAutohide); - this.Controls.Add(this.gAutoconn); - this.Controls.Add(this.gRecOGG); - this.Controls.Add(this.gUnavail); - this.Controls.Add(this.gRecPCM); - this.Controls.Add(this.gRecMP3); - this.Controls.Add(this.gSplash); - this.Controls.Add(this.gTestDevs); - this.Controls.Add(this.panel1); + this.ClientSize = new System.Drawing.Size(542, 388); + this.Controls.Add(this.pWrapper); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.Name = "ConfigSC"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Loopstream Config"; this.Load += new System.EventHandler(this.ConfigSC_Load); - this.groupBox4.ResumeLayout(false); - this.groupBox4.PerformLayout(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.pMp3.ResumeLayout(false); - this.pMp3.PerformLayout(); + this.Resize += new System.EventHandler(this.ConfigSC_Resize); + this.pWrapper.ResumeLayout(false); + this.tc.ResumeLayout(false); + this.tpSoundcard.ResumeLayout(false); + this.tpSoundcard.PerformLayout(); + this.tpServer.ResumeLayout(false); + this.tpServer.PerformLayout(); + this.tpEncoders.ResumeLayout(false); + this.tpEncoders.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - this.pOgg.ResumeLayout(false); - this.pOgg.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); + this.tpTags.ResumeLayout(false); + this.tpTags.PerformLayout(); + this.pTagsAdvanced2.ResumeLayout(false); + this.pTagsAdvanced2.PerformLayout(); + this.pTagAdvanced1.ResumeLayout(false); + this.pTagAdvanced1.PerformLayout(); + this.pFooter.ResumeLayout(false); + this.pFooter.PerformLayout(); + this.pButtons.ResumeLayout(false); + this.pTabs.ResumeLayout(false); + this.pTabs.PerformLayout(); this.ResumeLayout(false); - this.PerformLayout(); } @@ -841,7 +1412,6 @@ private void InitializeComponent() private System.Windows.Forms.ComboBox gOutS; private System.Windows.Forms.ComboBox gTwoS; private System.Windows.Forms.ComboBox gOneS; - private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.RadioButton gSiren; private System.Windows.Forms.RadioButton gIce; private System.Windows.Forms.RadioButton gShout; @@ -853,15 +1423,12 @@ private void InitializeComponent() private System.Windows.Forms.TextBox gHost; private System.Windows.Forms.Button gSave; private System.Windows.Forms.Button gCancel; - private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label10; private System.Windows.Forms.CheckBox gLeft; private System.Windows.Forms.CheckBox gRight; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel pWrapper; private System.Windows.Forms.CheckBox gTestDevs; private System.Windows.Forms.CheckBox gSplash; private System.Windows.Forms.CheckBox gRecMP3; @@ -884,15 +1451,64 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton gOggQuality; private System.Windows.Forms.TextBox gOggQualityV; private System.Windows.Forms.RadioButton gOggBitrate; - private System.Windows.Forms.Panel pMp3; - private System.Windows.Forms.Label gOgg; - private System.Windows.Forms.Label gMp3; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Panel pOgg; private System.Windows.Forms.CheckBox gUnavail; private System.Windows.Forms.CheckBox gRecOGG; private System.Windows.Forms.CheckBox gAutoconn; private System.Windows.Forms.CheckBox gAutohide; private System.Windows.Forms.ToolTip tt; + private System.Windows.Forms.Panel pTabs; + private System.Windows.Forms.Label label12; + private Loopstream.TLabel hTags; + private Loopstream.TLabel hEncoders; + private Loopstream.TLabel hServer; + private Loopstream.TLabel hSoundcard; + private System.Windows.Forms.Panel pFooter; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TabControl tc; + private System.Windows.Forms.TabPage tpSoundcard; + private System.Windows.Forms.TabPage tpServer; + private System.Windows.Forms.TabPage tpEncoders; + private System.Windows.Forms.TabPage tpTags; + private System.Windows.Forms.Panel pButtons; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox gURL; + private System.Windows.Forms.TextBox gTitle; + private System.Windows.Forms.TextBox gGenre; + private System.Windows.Forms.TextBox gDescription; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.CheckBox gPublic; + private System.Windows.Forms.ComboBox gReader; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label gResult; + private System.Windows.Forms.ComboBox gMeta; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Button gStore; + private System.Windows.Forms.TextBox gName; + private System.Windows.Forms.TextBox gSource; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Button gDelete; + private System.Windows.Forms.TextBox gPattern; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.TextBox gFreq; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.CheckBox gTest; + private System.Windows.Forms.Button gReload; + private System.Windows.Forms.Label gEncodingL; + private System.Windows.Forms.TextBox gEncoding; + private System.Windows.Forms.CheckBox gLatinize; + private System.Windows.Forms.Panel pTagAdvanced1; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Panel pTagsAdvanced2; + private System.Windows.Forms.Button gTagsAdvanced; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.TextBox gGroup; } } \ No newline at end of file diff --git a/Loopstream/UI_ConfigSC.cs b/Loopstream/UI_ConfigSC.cs index 187d914..84f5709 100644 --- a/Loopstream/UI_ConfigSC.cs +++ b/Loopstream/UI_ConfigSC.cs @@ -17,12 +17,14 @@ public ConfigSC(LSSettings settings) { this.settings = settings; InitializeComponent(); + pTabs.BringToFront(); } Timer tPop; Control popTop; bool disregardEvents; public LSSettings settings; //, apply; + bool doRegexTests; private void button2_Click(object sender, EventArgs e) { @@ -190,6 +192,8 @@ private void ConfigSC_Load(object sender, EventArgs e) t.Interval = 100; t.Start(); } + Panel[] tabPage; + TLabel[] tabHeader; void t_Tick(object sender, EventArgs e) { ((Timer)sender).Stop(); @@ -197,6 +201,8 @@ void t_Tick(object sender, EventArgs e) populate(false, gTwoS); LSDevice nil = new LSDevice(); nil.name = "(disabled)"; + doRegexTests = false; + gTwoS.Items.Insert(0, nil); gOneS.SelectedItem = settings.devRec; gTwoS.SelectedItem = settings.devMic; @@ -226,6 +232,12 @@ void t_Tick(object sender, EventArgs e) gShout.Checked = settings.relay == LSSettings.LSRelay.shout; gIce.Checked = settings.relay == LSSettings.LSRelay.ice; gSiren.Checked = settings.relay == LSSettings.LSRelay.siren; + gTitle.Text = settings.title; + gDescription.Text = settings.description; + gGenre.Text = settings.genre; + gURL.Text = settings.url; + gPublic.Checked = settings.pubstream; + gTestDevs.Checked = settings.testDevs; gUnavail.Checked = settings.showUnavail; gSplash.Checked = settings.splash; @@ -235,14 +247,66 @@ void t_Tick(object sender, EventArgs e) gAutoconn.Checked = settings.autoconn; gAutohide.Checked = settings.autohide; + gReader.Items.Add(LSSettings.LSMeta.Reader.WindowCaption); + gReader.Items.Add(LSSettings.LSMeta.Reader.File); + gReader.Items.Add(LSSettings.LSMeta.Reader.Website); + gReader.Items.Add(LSSettings.LSMeta.Reader.ProcessMemory); + loadMetaReader(true); + disregardEvents = false; - gMp3_Click(sender, e); + + tabHeader = new TLabel[] { hSoundcard, hServer, hEncoders, hTags }; + /*tabPage = new Panel[tabHeader.Length]; + for (int a = 0; a < tabHeader.Length; a++) + { + tabPage[a] = new Panel(); + while (tc.TabPages[a].Controls.Count > 0) + { + Control c = tc.TabPages[a].Controls[0]; + Rectangle rect = c.Bounds; + tc.TabPages[a].Controls.RemoveAt(0); + tabPage[a].Controls.Add(c); + c.Bounds = rect; + } + tabHeader[a].MouseDown += tabHeader_MouseDown; + tabPage[a].Dock = DockStyle.Fill; + pWrapper.Controls.Add(tabPage[a]); + } + tc.Dispose();*/ + pTabs.BringToFront(); + for (int a = 0; a < tabHeader.Length; a++) + { + tabHeader[a].MouseDown += tabHeader_MouseDown; + } + tabHeader_MouseDown(tabHeader[0], new MouseEventArgs(System.Windows.Forms.MouseButtons.Left, 1, 20, 10, 0)); tPop = new Timer(); tPop.Interval = tt.InitialDelay; tPop.Tick += tPop_Tick; } + void tabHeader_MouseDown(object sender, MouseEventArgs e) + { + int i = Array.IndexOf(tabHeader, sender); + TLabel ass = tabHeader[i]; + if (i > 0 && e.X < 8) i--; + if (i < tabHeader.Length - 1 && e.X > ass.Width - 8) i++; + ass = tabHeader[i]; + + foreach (TLabel l in tabHeader) + { + l.ForeColor = SystemColors.ControlDark; + l.ShadeBack = false; + //l.SendToBack(); + } + label5.BringToFront(); + ass.BringToFront(); + ass.ShadeBack = true; + ass.ForeColor = SystemColors.ControlText; + //tabPage[i].BringToFront(); + tc.SelectedIndex = i; + } + void populate(bool playback, params ComboBox[] lb) { foreach (ComboBox l in lb) @@ -275,8 +339,8 @@ int getValue(TextBox tb) } else { - tb.BackColor = Color.Red; - tb.ForeColor = Color.Yellow; + tb.BackColor = Color.Firebrick; + tb.ForeColor = Color.Gold; return -1; } } @@ -294,8 +358,8 @@ private void gHost_TextChanged(object sender, EventArgs e) } catch { - gHost.BackColor = Color.Red; - gHost.ForeColor = Color.Yellow; + gHost.BackColor = Color.Firebrick; + gHost.ForeColor = Color.Gold; } } @@ -309,8 +373,8 @@ private void gPass_TextChanged(object sender, EventArgs e) } else { - gPass.BackColor = Color.Red; - gPass.ForeColor = Color.Yellow; + gPass.BackColor = Color.Firebrick; + gPass.ForeColor = Color.Gold; } } @@ -324,8 +388,8 @@ private void gMount_TextChanged(object sender, EventArgs e) } else { - gMount.BackColor = Color.Red; - gMount.ForeColor = Color.Yellow; + gMount.BackColor = Color.Firebrick; + gMount.ForeColor = Color.Gold; } } @@ -501,21 +565,7 @@ private void gOggQualityV_TextChanged(object sender, EventArgs e) int n = getValue(gOggQualityV); if (n >= 0) settings.ogg.quality = n; } - - private void gMp3_Click(object sender, EventArgs e) - { - gOgg.ForeColor = SystemColors.ButtonShadow; - gMp3.ForeColor = SystemColors.WindowText; - pMp3.BringToFront(); - } - - private void gOgg_Click(object sender, EventArgs e) - { - gMp3.ForeColor = SystemColors.ButtonShadow; - gOgg.ForeColor = SystemColors.WindowText; - pOgg.BringToFront(); - } - + private void gUnavail_CheckedChanged(object sender, EventArgs e) { settings.showUnavail = gUnavail.Checked; @@ -550,5 +600,249 @@ void tPop_Tick(object sender, EventArgs e) // fucking hell microsoft how did you fuck THIS up tt.Show(tt.GetToolTip(popTop), gTwoS); } + + private void gTitle_TextChanged(object sender, EventArgs e) + { + settings.title = gTitle.Text; + } + + private void gDescription_TextChanged(object sender, EventArgs e) + { + settings.description = gDescription.Text; + } + + private void gGenre_TextChanged(object sender, EventArgs e) + { + settings.genre = gGenre.Text; + } + + private void gURL_TextChanged(object sender, EventArgs e) + { + settings.url = gURL.Text; + } + + private void gPublic_CheckedChanged(object sender, EventArgs e) + { + settings.pubstream = gPublic.Checked; + } + + private void gMeta_SelectedIndexChanged(object sender, EventArgs e) + { + settings.meta.apply((LSSettings.LSMeta)gMeta.SelectedItem); + loadMetaReader(false); + if (settings.meta.reader == LSSettings.LSMeta.Reader.ProcessMemory) + { + // TODO: Clean this up + // (was thrown in in a hurry when I realized + // mempoke didn't work on 32bit apps from world of 64) + + if (IntPtr.Size == 4) + { + MessageBox.Show("I see you're running the 32bit version of Loopstream!\r\n\r\n" + + "If iTunes still doesn't produce correct tags with this edition of Loopstream, then the problem is probably that your version of iTunes is different from the one that Loopstream supports.\r\n\r\n" + + "Yes, iTunes is /that/ picky. Sorry :("); + return; + } + + if (DialogResult.Yes == MessageBox.Show( + "This media player's a tricky one.\r\n\r\n" + + "If the tags you send appear to be bullshit,\r\n" + + "I can make a copy of myself that might\r\n" + + "work better for this.\r\n\r\n" + + "Should I clone myself to Loopstream32.exe?", + "Hot Cloning Action", + MessageBoxButtons.YesNo, + MessageBoxIcon.Question)) + { + string fo = Application.ExecutablePath; + using (System.IO.FileStream i = new System.IO.FileStream(fo, System.IO.FileMode.Open, System.IO.FileAccess.Read)) + { + fo = fo.Substring(0, fo.LastIndexOf('.')) + "32.exe"; + using (System.IO.FileStream o = new System.IO.FileStream(fo, System.IO.FileMode.Create)) + { + bool first = true; + byte[] buf = new byte[8192]; + while (true) + { + int n = i.Read(buf, 0, buf.Length); + if (first) + { + first = false; + buf[0x218] = 3; //1=any + } + if (n <= 0) break; + o.Write(buf, 0, n); + } + } + } + System.Diagnostics.Process rs = new System.Diagnostics.Process(); + rs.StartInfo.FileName = "Loopstream32.exe"; + rs.StartInfo.Arguments = "sign"; + rs.Start(); + Application.DoEvents(); + rs.Refresh(); + while (!rs.HasExited) + { + Application.DoEvents(); + System.Threading.Thread.Sleep(10); + } + for (int a = 0; a < 10; a++) + { + try + { + System.IO.File.Delete("Loopstream32.exe"); + System.IO.File.Move("Loopstream32.exe.exe", "Loopstream32.exe"); + break; + } + catch { } + System.Threading.Thread.Sleep(100); + } + + System.Diagnostics.Process proc = new System.Diagnostics.Process(); + proc.StartInfo.FileName = "Loopstream32.exe"; + proc.Start(); + proc.Refresh(); + Program.kill(); + + } + } + } + + private void ConfigSC_Resize(object sender, EventArgs e) + { + pTabs.Width = pFooter.Width; + } + + private void gTagsAdvanced_Click(object sender, EventArgs e) + { + pTagAdvanced1.Visible = pTagsAdvanced2.Visible = true; + gTagsAdvanced.Visible = false; + } + + private void gReader_SelectedIndexChanged(object sender, EventArgs e) + { + settings.meta.reader = (LSSettings.LSMeta.Reader)gReader.SelectedItem; + gEncoding.Visible = gEncodingL.Visible = (settings.meta.reader != LSSettings.LSMeta.Reader.WindowCaption); + if (settings.meta.reader == LSSettings.LSMeta.Reader.Website || + settings.meta.reader == LSSettings.LSMeta.Reader.File) + { + gEncoding.Text = "utf-8"; + } + if (settings.meta.reader == LSSettings.LSMeta.Reader.ProcessMemory) + { + gEncoding.Text = "utf-16"; + } + gEncoding_TextChanged(sender, e); + } + + private void gSource_TextChanged(object sender, EventArgs e) + { + settings.meta.src = gSource.Text; + } + + string metaRaw = null; + private void gPattern_TextChanged(object sender, EventArgs e) + { + settings.meta.ptn = gPattern.Text; + bool mem = settings.meta.reader == LSSettings.LSMeta.Reader.ProcessMemory; + if (gTest.Checked || mem) + { + if (metaRaw == null) gReload_Click(sender, e); + if (metaRaw == null) + { + gResult.Text = "(metafetch failure)"; + return; + } + gResult.Text = mem ? metaRaw : + LSTag.get(settings.meta, metaRaw).Replace("\r", "").Replace("\n", ""); + } + } + + private void gReload_Click(object sender, EventArgs e) + { + metaRaw = LSTag.get(settings.meta, true); + gPattern_TextChanged(sender, e); + } + + private void gFreq_TextChanged(object sender, EventArgs e) + { + int n = getValue(gFreq); + if (n >= 0) settings.meta.freq = n; + } + + private void gName_TextChanged(object sender, EventArgs e) + { + settings.meta.tit = gName.Text; + } + + private void gEncoding_TextChanged(object sender, EventArgs e) + { + try + { + settings.meta.encoding = gEncoding.Text; + gEncoding.BackColor = SystemColors.Window; + gEncoding.ForeColor = SystemColors.WindowText; + } + catch + { + gEncoding.BackColor = Color.Firebrick; + gEncoding.ForeColor = Color.Gold; + } + } + + private void gTest_CheckedChanged(object sender, EventArgs e) + { + doRegexTests = gTest.Checked; + } + + private void gStore_Click(object sender, EventArgs e) + { + settings.metas.Add(settings.meta); + loadMetaReader(true); + gMeta.SelectedItem = settings.meta; + } + + private void gLatinize_CheckedChanged(object sender, EventArgs e) + { + settings.latin = gLatinize.Checked; + } + + void loadMetaReader(bool redoPresets) + { + if (redoPresets) + { + gMeta.Items.Clear(); + foreach (LSSettings.LSMeta meta in settings.metas) + { + gMeta.Items.Add(meta); + } + } + gReader.SelectedItem = settings.meta.reader; + gSource.Text = settings.meta.src; + gPattern.Text = settings.meta.ptn; + gFreq.Text = settings.meta.freq.ToString(); + gName.Text = settings.meta.tit; + gEncoding.Text = settings.meta.enc.WebName; + gLatinize.Checked = settings.latin; + gTest.Checked = doRegexTests; + gGroup.Text = settings.meta.grp.ToString(); + if (redoPresets) + { + foreach (LSSettings.LSMeta m in settings.metas) + { + if (m.tit == settings.meta.tit) + { + gMeta.SelectedItem = m; + return; + } + } + } + } + + private void gGroup_TextChanged(object sender, EventArgs e) + { + int n = getValue(gGroup); + if (n >= 0) settings.meta.grp = n; + } } } diff --git a/Loopstream/UI_ConfigSC.resx b/Loopstream/UI_ConfigSC.resx index 29e5f11..70f9f5f 100644 --- a/Loopstream/UI_ConfigSC.resx +++ b/Loopstream/UI_ConfigSC.resx @@ -120,10 +120,4 @@ 17, 17 - - 17, 17 - - - 17, 17 - \ No newline at end of file diff --git a/Loopstream/UI_Home.Designer.cs b/Loopstream/UI_Home.Designer.cs index df8bb60..312d7f5 100644 --- a/Loopstream/UI_Home.Designer.cs +++ b/Loopstream/UI_Home.Designer.cs @@ -29,21 +29,15 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.box_sliders = new System.Windows.Forms.Panel(); - this.gMusic = new Loopstream.Verter(); - this.gOut = new Loopstream.Verter(); - this.gMic = new Loopstream.Verter(); - this.gSpeed = new Loopstream.Verter(); this.box_top = new System.Windows.Forms.Panel(); this.box_top_dark = new System.Windows.Forms.Label(); this.box_top_light = new System.Windows.Forms.Label(); - this.box_top_graden = new Loopstream.Graden(); this.box_bottom = new System.Windows.Forms.Panel(); this.box_unused1 = new System.Windows.Forms.Panel(); this.box_unused1_light = new System.Windows.Forms.Label(); this.box_unused1_dark = new System.Windows.Forms.Label(); this.box_bottom_dark = new System.Windows.Forms.Label(); this.box_bottom_light = new System.Windows.Forms.Label(); - this.box_bottom_graden = new Loopstream.Graden(); this.box_menu_outer = new System.Windows.Forms.Panel(); this.box_menu = new System.Windows.Forms.Panel(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); @@ -59,6 +53,12 @@ private void InitializeComponent() this.gLoad = new System.Windows.Forms.Button(); this.gB = new System.Windows.Forms.Button(); this.gA = new System.Windows.Forms.Button(); + this.gMusic = new Loopstream.Verter(); + this.gOut = new Loopstream.Verter(); + this.gMic = new Loopstream.Verter(); + this.gSpeed = new Loopstream.Verter(); + this.box_top_graden = new Loopstream.Graden(); + this.box_bottom_graden = new Loopstream.Graden(); this.box_sliders.SuspendLayout(); this.box_top.SuspendLayout(); this.box_bottom.SuspendLayout(); @@ -83,62 +83,6 @@ private void InitializeComponent() this.box_sliders.Size = new System.Drawing.Size(476, 416); this.box_sliders.TabIndex = 4; // - // gMusic - // - this.gMusic.BackColor = System.Drawing.SystemColors.ControlLight; - this.gMusic.canToggle = true; - this.gMusic.enabled = true; - this.gMusic.level = 0; - this.gMusic.Location = new System.Drawing.Point(17, 17); - this.gMusic.Margin = new System.Windows.Forms.Padding(8); - this.gMusic.Name = "gMusic"; - this.gMusic.Size = new System.Drawing.Size(98, 382); - this.gMusic.TabIndex = 0; - this.gMusic.timeScale = false; - this.gMusic.title = "Music"; - // - // gOut - // - this.gOut.BackColor = System.Drawing.SystemColors.ControlLight; - this.gOut.canToggle = true; - this.gOut.enabled = true; - this.gOut.level = 0; - this.gOut.Location = new System.Drawing.Point(359, 17); - this.gOut.Margin = new System.Windows.Forms.Padding(8); - this.gOut.Name = "gOut"; - this.gOut.Size = new System.Drawing.Size(98, 382); - this.gOut.TabIndex = 3; - this.gOut.timeScale = false; - this.gOut.title = "OUT"; - // - // gMic - // - this.gMic.BackColor = System.Drawing.SystemColors.ControlLight; - this.gMic.canToggle = true; - this.gMic.enabled = true; - this.gMic.level = 0; - this.gMic.Location = new System.Drawing.Point(131, 17); - this.gMic.Margin = new System.Windows.Forms.Padding(8); - this.gMic.Name = "gMic"; - this.gMic.Size = new System.Drawing.Size(98, 382); - this.gMic.TabIndex = 1; - this.gMic.timeScale = false; - this.gMic.title = "mic"; - // - // gSpeed - // - this.gSpeed.BackColor = System.Drawing.SystemColors.ControlLight; - this.gSpeed.canToggle = false; - this.gSpeed.enabled = true; - this.gSpeed.level = 0; - this.gSpeed.Location = new System.Drawing.Point(245, 17); - this.gSpeed.Margin = new System.Windows.Forms.Padding(8); - this.gSpeed.Name = "gSpeed"; - this.gSpeed.Size = new System.Drawing.Size(98, 382); - this.gSpeed.TabIndex = 2; - this.gSpeed.timeScale = true; - this.gSpeed.title = "Speed"; - // // box_top // this.box_top.BackColor = System.Drawing.SystemColors.ControlLight; @@ -169,18 +113,6 @@ private void InitializeComponent() this.box_top_light.Size = new System.Drawing.Size(476, 1); this.box_top_light.TabIndex = 10; // - // box_top_graden - // - this.box_top_graden.co = 1D; - this.box_top_graden.colorA = System.Drawing.SystemColors.Control; - this.box_top_graden.colorB = System.Drawing.SystemColors.ControlLight; - this.box_top_graden.Direction = false; - this.box_top_graden.Dock = System.Windows.Forms.DockStyle.Fill; - this.box_top_graden.Location = new System.Drawing.Point(0, 0); - this.box_top_graden.Name = "box_top_graden"; - this.box_top_graden.Size = new System.Drawing.Size(476, 59); - this.box_top_graden.TabIndex = 13; - // // box_bottom // this.box_bottom.BackColor = System.Drawing.SystemColors.ControlLight; @@ -242,18 +174,6 @@ private void InitializeComponent() this.box_bottom_light.Size = new System.Drawing.Size(476, 1); this.box_bottom_light.TabIndex = 10; // - // box_bottom_graden - // - this.box_bottom_graden.co = 1D; - this.box_bottom_graden.colorA = System.Drawing.SystemColors.Control; - this.box_bottom_graden.colorB = System.Drawing.SystemColors.ControlLight; - this.box_bottom_graden.Direction = true; - this.box_bottom_graden.Dock = System.Windows.Forms.DockStyle.Fill; - this.box_bottom_graden.Location = new System.Drawing.Point(0, 0); - this.box_bottom_graden.Name = "box_bottom_graden"; - this.box_bottom_graden.Size = new System.Drawing.Size(476, 105); - this.box_bottom_graden.TabIndex = 12; - // // box_menu_outer // this.box_menu_outer.BackColor = System.Drawing.SystemColors.ControlLight; @@ -334,7 +254,7 @@ private void InitializeComponent() this.gConnect.Margin = new System.Windows.Forms.Padding(8, 8, 8, 3); this.gConnect.Name = "gConnect"; this.gConnect.Size = new System.Drawing.Size(141, 43); - this.gConnect.TabIndex = 0; + this.gConnect.TabIndex = 1; this.gConnect.Text = "Connect"; this.gConnect.UseVisualStyleBackColor = true; this.gConnect.Click += new System.EventHandler(this.gConnect_Click); @@ -356,7 +276,7 @@ private void InitializeComponent() this.gSettings.Margin = new System.Windows.Forms.Padding(8, 3, 8, 3); this.gSettings.Name = "gSettings"; this.gSettings.Size = new System.Drawing.Size(141, 43); - this.gSettings.TabIndex = 1; + this.gSettings.TabIndex = 2; this.gSettings.Text = "Settings"; this.gSettings.UseVisualStyleBackColor = true; this.gSettings.Click += new System.EventHandler(this.gSettings_Click); @@ -367,7 +287,7 @@ private void InitializeComponent() this.gD.Margin = new System.Windows.Forms.Padding(3, 0, 8, 0); this.gD.Name = "gD"; this.gD.Size = new System.Drawing.Size(69, 39); - this.gD.TabIndex = 8; + this.gD.TabIndex = 7; this.gD.Text = "D"; this.gD.UseVisualStyleBackColor = true; this.gD.Click += new System.EventHandler(this.gPreset_Click); @@ -378,7 +298,7 @@ private void InitializeComponent() this.gExit.Margin = new System.Windows.Forms.Padding(8, 3, 8, 3); this.gExit.Name = "gExit"; this.gExit.Size = new System.Drawing.Size(141, 43); - this.gExit.TabIndex = 2; + this.gExit.TabIndex = 3; this.gExit.Text = "Exit"; this.gExit.UseVisualStyleBackColor = true; this.gExit.Click += new System.EventHandler(this.gExit_Click); @@ -389,7 +309,7 @@ private void InitializeComponent() this.gC.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0); this.gC.Name = "gC"; this.gC.Size = new System.Drawing.Size(69, 39); - this.gC.TabIndex = 7; + this.gC.TabIndex = 6; this.gC.Text = "C"; this.gC.UseVisualStyleBackColor = true; this.gC.Click += new System.EventHandler(this.gPreset_Click); @@ -400,7 +320,7 @@ private void InitializeComponent() this.gLoad.Margin = new System.Windows.Forms.Padding(8, 3, 8, 8); this.gLoad.Name = "gLoad"; this.gLoad.Size = new System.Drawing.Size(141, 40); - this.gLoad.TabIndex = 3; + this.gLoad.TabIndex = 8; this.gLoad.Text = "Load preset"; this.gLoad.UseVisualStyleBackColor = true; this.gLoad.Click += new System.EventHandler(this.gLoad_Click); @@ -411,7 +331,7 @@ private void InitializeComponent() this.gB.Margin = new System.Windows.Forms.Padding(3, 0, 8, 3); this.gB.Name = "gB"; this.gB.Size = new System.Drawing.Size(69, 39); - this.gB.TabIndex = 6; + this.gB.TabIndex = 5; this.gB.Text = "B"; this.gB.UseVisualStyleBackColor = true; this.gB.Click += new System.EventHandler(this.gPreset_Click); @@ -422,11 +342,91 @@ private void InitializeComponent() this.gA.Margin = new System.Windows.Forms.Padding(8, 0, 0, 3); this.gA.Name = "gA"; this.gA.Size = new System.Drawing.Size(69, 39); - this.gA.TabIndex = 5; + this.gA.TabIndex = 4; this.gA.Text = "A"; this.gA.UseVisualStyleBackColor = true; this.gA.Click += new System.EventHandler(this.gPreset_Click); // + // gMusic + // + this.gMusic.BackColor = System.Drawing.SystemColors.ControlLight; + this.gMusic.canToggle = true; + this.gMusic.enabled = true; + this.gMusic.level = 0; + this.gMusic.Location = new System.Drawing.Point(17, 17); + this.gMusic.Margin = new System.Windows.Forms.Padding(8); + this.gMusic.Name = "gMusic"; + this.gMusic.Size = new System.Drawing.Size(98, 382); + this.gMusic.TabIndex = 9; + this.gMusic.timeScale = false; + this.gMusic.title = "Music"; + // + // gOut + // + this.gOut.BackColor = System.Drawing.SystemColors.ControlLight; + this.gOut.canToggle = true; + this.gOut.enabled = true; + this.gOut.level = 0; + this.gOut.Location = new System.Drawing.Point(359, 17); + this.gOut.Margin = new System.Windows.Forms.Padding(8); + this.gOut.Name = "gOut"; + this.gOut.Size = new System.Drawing.Size(98, 382); + this.gOut.TabIndex = 12; + this.gOut.timeScale = false; + this.gOut.title = "OUT"; + // + // gMic + // + this.gMic.BackColor = System.Drawing.SystemColors.ControlLight; + this.gMic.canToggle = true; + this.gMic.enabled = true; + this.gMic.level = 0; + this.gMic.Location = new System.Drawing.Point(131, 17); + this.gMic.Margin = new System.Windows.Forms.Padding(8); + this.gMic.Name = "gMic"; + this.gMic.Size = new System.Drawing.Size(98, 382); + this.gMic.TabIndex = 10; + this.gMic.timeScale = false; + this.gMic.title = "mic"; + // + // gSpeed + // + this.gSpeed.BackColor = System.Drawing.SystemColors.ControlLight; + this.gSpeed.canToggle = false; + this.gSpeed.enabled = true; + this.gSpeed.level = 0; + this.gSpeed.Location = new System.Drawing.Point(245, 17); + this.gSpeed.Margin = new System.Windows.Forms.Padding(8); + this.gSpeed.Name = "gSpeed"; + this.gSpeed.Size = new System.Drawing.Size(98, 382); + this.gSpeed.TabIndex = 11; + this.gSpeed.timeScale = true; + this.gSpeed.title = "Speed"; + // + // box_top_graden + // + this.box_top_graden.co = 1D; + this.box_top_graden.colorA = System.Drawing.SystemColors.Control; + this.box_top_graden.colorB = System.Drawing.SystemColors.ControlLight; + this.box_top_graden.Direction = false; + this.box_top_graden.Dock = System.Windows.Forms.DockStyle.Fill; + this.box_top_graden.Location = new System.Drawing.Point(0, 0); + this.box_top_graden.Name = "box_top_graden"; + this.box_top_graden.Size = new System.Drawing.Size(476, 59); + this.box_top_graden.TabIndex = 13; + // + // box_bottom_graden + // + this.box_bottom_graden.co = 1D; + this.box_bottom_graden.colorA = System.Drawing.SystemColors.Control; + this.box_bottom_graden.colorB = System.Drawing.SystemColors.ControlLight; + this.box_bottom_graden.Direction = true; + this.box_bottom_graden.Dock = System.Windows.Forms.DockStyle.Fill; + this.box_bottom_graden.Location = new System.Drawing.Point(0, 0); + this.box_bottom_graden.Name = "box_bottom_graden"; + this.box_bottom_graden.Size = new System.Drawing.Size(476, 105); + this.box_bottom_graden.TabIndex = 12; + // // Home // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/Loopstream/UI_Home.cs b/Loopstream/UI_Home.cs index e5eab56..2ba0359 100644 --- a/Loopstream/UI_Home.cs +++ b/Loopstream/UI_Home.cs @@ -37,8 +37,8 @@ public Home() Rectangle myBounds; LSMixer mixer; LSPcmFeed pcm; - //LSLame lame; - Control[] invals; + LSTag tag; + Control[] invals; //sorry private void Form1_Load(object sender, EventArgs e) { @@ -70,19 +70,9 @@ void t_Tick(object sender, EventArgs e) } settings = LSSettings.load(); - //settings.mixer.valueChanged += mixer_valueChanged; - //mixer_valueChanged(sender, e); + settings.runTests(splash); isPresetLoad = true; - //LSDevice dev = devs.First(x => x.id == "{0.0.0.00000000}.{d59c0b32-c0fd-4390-b85f-600fc68eacee}"); - //NAudio.Wave.WasapiLoopbackCapture wlc = new NAudio.Wave.WasapiLoopbackCapture(dev.mm); - //wlc.DataAvailable += wlc_DataAvailable; - //wlc.StartRecording(); - - //System.Threading.Thread.Sleep(500); - //splash.Close(); - //splash.Dispose(); - gMusic.valueChanged += gSlider_valueChanged; gMic.valueChanged += gSlider_valueChanged; gSpeed.valueChanged += gSlider_valueChanged; @@ -170,7 +160,13 @@ void t_Tick(object sender, EventArgs e) gOut.graden2, }; invalOnNext = false; + + Timer tTitle = new Timer(); + tTitle.Tick += tTitle_Tick; + tTitle.Interval = 200; + tTitle.Start(); } + bool invalOnNext; void inval() { @@ -278,6 +274,7 @@ private void gConnect_Click(object sender, EventArgs e) if (gConnect.Text == "Connect") { gConnect.Text = "D I S C O N N E C T"; + tag = new LSTag(settings); mixer = new LSMixer(settings); pcm = new LSPcmFeed(settings, mixer.lameOutlet); } @@ -431,5 +428,14 @@ private void gGit_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("http://github.com/9001/loopstream"); } + + void tTitle_Tick(object sender, EventArgs e) + { + if (tag == null) return; + this.Text = string.Format("{0:0.00} // {1:0.00} // {2}", + Math.Round(settings.mp3.FIXME_kbps, 2), + Math.Round(settings.ogg.FIXME_kbps, 2), + tag.tag); + } } } \ No newline at end of file diff --git a/Loopstream/UI_Splesh.Designer.cs b/Loopstream/UI_Splesh.Designer.cs index 6a255cb..e246955 100644 --- a/Loopstream/UI_Splesh.Designer.cs +++ b/Loopstream/UI_Splesh.Designer.cs @@ -65,7 +65,7 @@ private void InitializeComponent() this.label3.BackColor = System.Drawing.Color.White; this.label3.Location = new System.Drawing.Point(0, 382); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(1, 2); + this.label3.Size = new System.Drawing.Size(1, 1); this.label3.TabIndex = 2; this.label3.Visible = false; // diff --git a/Loopstream/UI_Splesh.cs b/Loopstream/UI_Splesh.cs index ba31ac2..bfc8f28 100644 --- a/Loopstream/UI_Splesh.cs +++ b/Loopstream/UI_Splesh.cs @@ -48,6 +48,13 @@ public void vis() Application.DoEvents(); } + public void prog(int cur, int max) + { + label3.Visible = true; + label3.Width = (int)(this.Width * cur * 1.0 / max); + Application.DoEvents(); + } + private void Splesh_MouseClick(object sender, MouseEventArgs e) { gtfo(); diff --git a/Loopstream/Z.cs b/Loopstream/Z.cs index 53b4c9f..25bc27e 100644 --- a/Loopstream/Z.cs +++ b/Loopstream/Z.cs @@ -4,11 +4,56 @@ using System.Drawing; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Loopstream { - + public class LSMem + { + [Flags] + public enum ProcessAccessFlags : uint + { + All = 0x001f0fff, + Terminate = 0x00000001, + CreateThread = 0x00000002, + VMOperation = 0x00000008, + VMRead = 0x00000010, + VMWrite = 0x00000020, + DupHandle = 0x00000040, + SetInformation = 0x00000200, + QueryInformation = 0x00000400, + Synchronize = 0x00100000, + }; + + [DllImport("kernel32.dll")] + private static extern IntPtr OpenProcess(ProcessAccessFlags dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId); + [DllImport("kernel32.dll")] + private static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out int lpNumberOfBytesWritten); + [DllImport("kernel32.dll")] + private static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, out int lpNumberOfBytesWritten); + [DllImport("kernel32.dll")] + private static extern IntPtr CloseHandle(IntPtr hProcess); + + IntPtr handle; + + public LSMem(Process proc) + { + handle = OpenProcess(ProcessAccessFlags.VMRead, false, proc.Id); + } + + public void Dispose() + { + CloseHandle(handle); + } + + public int read(IntPtr adr, byte[] buf) + { + int ret = -1; + ReadProcessMemory(handle, adr, buf, sizeof(byte) * buf.Length, out ret); + return ret; + } + } } diff --git a/Loopstream/res/tools.dfc.nfo b/Loopstream/res/tools.dfc.nfo index 324bdd0..3204df1 100644 --- a/Loopstream/res/tools.dfc.nfo +++ b/Loopstream/res/tools.dfc.nfo @@ -1,3 +1,3 @@ c5cd237a7c5e440ee432bf66b743ea89 -2013-07-27, 20:03:11 +2013-07-30, 10:37:07 1669141 byte diff --git a/Loopstream/turnkey/Chencode.cs b/Loopstream/turnkey/Chencode.cs new file mode 100644 index 0000000..2871485 --- /dev/null +++ b/Loopstream/turnkey/Chencode.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Loopstream +{ + public class Chencode + { + /// + /// Perform RFC 3986 Percent-encoding on a string. + /// + /// The input string + /// The RFC 3986 Percent-encoded string + public static string HonkHonk(string input) + { + if (string.IsNullOrEmpty(input)) + return string.Empty; + + return Encoding.ASCII.GetString(EncodeToBytes(input, Encoding.UTF8)); + } + + private static byte[] EncodeToBytes(string input, Encoding enc) + { + if (string.IsNullOrEmpty(input)) + return new byte[0]; + + byte[] inbytes = enc.GetBytes(input); + + // Count unsafe characters + int unsafeChars = 0; + char c; + foreach (byte b in inbytes) + { + c = (char)b; + + if (NeedsEscaping(c)) + unsafeChars++; + } + + // Check if we need to do any encoding + if (unsafeChars == 0) + return inbytes; + + byte[] outbytes = new byte[inbytes.Length + (unsafeChars * 2)]; + int pos = 0; + + for (int i = 0; i < inbytes.Length; i++) + { + byte b = inbytes[i]; + + if (NeedsEscaping((char)b)) + { + outbytes[pos++] = (byte)'%'; + outbytes[pos++] = (byte)IntToHex((b >> 4) & 0xf); + outbytes[pos++] = (byte)IntToHex(b & 0x0f); + } + else + outbytes[pos++] = b; + } + + return outbytes; + } + + private static bool NeedsEscaping(char c) + { + return !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') + || c == '-' || c == '_' || c == '.' || c == '~'); + } + + private static char IntToHex(int n) + { + if (n < 0 || n >= 16) + throw new ArgumentOutOfRangeException("n"); + + if (n <= 9) + return (char)(n + (int)'0'); + else + return (char)(n - 10 + (int)'A'); + } + + } +} diff --git a/changelog.txt b/changelog.txt index 5eb8275..bf2688a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,13 @@ + new feature ~ other change +2013-07-30, 12:08:47 - Loopstream 1.1.0.0 + + TAGS (foobar,winamp,vlc,itunes,custom) + + 32bit cloning for eavesdropping on 32bit apps + + Settings GUI looks dope + + Basic network monitor + + Soundcard detection progressbar + 2013-07-28, 19:52:36 - Loopstream 1.0.0.0 = GUI only breaks if other windows move over it + Reconnect on drop