From 6ddf67fb299ef78ca50ae5161d65f8e6af970f6d Mon Sep 17 00:00:00 2001 From: Tryanks Date: Sat, 17 Sep 2022 01:55:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=89=E5=8C=96=E7=95=8C=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0Fork=E8=87=AA=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Form1.Designer.cs | 52 +++++++++++++++++++++------------------ Form1.cs | 6 ++--- README.md | 11 +++++++++ installer/FlexASIOGUI.iss | 2 +- 4 files changed, 43 insertions(+), 28 deletions(-) diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 75871e3..3f80178 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -1,4 +1,6 @@ -namespace FlexASIOGUI +using System.Drawing; + +namespace FlexASIOGUI { partial class Form1 { @@ -28,6 +30,8 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + this.MinimumSize = new Size(1000, 600); + this.treeDevicesInput = new System.Windows.Forms.TreeView(); this.treeDevicesOutput = new System.Windows.Forms.TreeView(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); @@ -176,7 +180,7 @@ private void InitializeComponent() this.btSaveAs.Name = "btSaveAs"; this.btSaveAs.Size = new System.Drawing.Size(75, 24); this.btSaveAs.TabIndex = 0; - this.btSaveAs.Text = "Save as"; + this.btSaveAs.Text = "另存为"; this.btSaveAs.UseVisualStyleBackColor = true; this.btSaveAs.Click += new System.EventHandler(this.btSaveAs_Click); // @@ -189,20 +193,20 @@ private void InitializeComponent() this.btLoadFrom.Name = "btLoadFrom"; this.btLoadFrom.Size = new System.Drawing.Size(75, 24); this.btLoadFrom.TabIndex = 1; - this.btLoadFrom.Text = "Load from"; + this.btLoadFrom.Text = "读取配置"; this.btLoadFrom.UseVisualStyleBackColor = true; this.btLoadFrom.Click += new System.EventHandler(this.btLoadFrom_Click); // // btRefreshDevices // - this.btRefreshDevices.AccessibleName = "Refresh Devices"; + this.btRefreshDevices.AccessibleName = "刷新设备列表"; this.btRefreshDevices.AutoSize = true; this.btRefreshDevices.Location = new System.Drawing.Point(577, 3); this.btRefreshDevices.MinimumSize = new System.Drawing.Size(0, 23); this.btRefreshDevices.Name = "btRefreshDevices"; this.btRefreshDevices.Size = new System.Drawing.Size(99, 24); this.btRefreshDevices.TabIndex = 19; - this.btRefreshDevices.Text = "Refresh Devices"; + this.btRefreshDevices.Text = "刷新设备列表"; this.btRefreshDevices.UseVisualStyleBackColor = true; this.btRefreshDevices.Click += new System.EventHandler(this.btRefreshDevices_Click); // @@ -213,7 +217,7 @@ private void InitializeComponent() this.btClipboard.Name = "btClipboard"; this.btClipboard.Size = new System.Drawing.Size(295, 24); this.btClipboard.TabIndex = 0; - this.btClipboard.Text = "Copy to Clipboard"; + this.btClipboard.Text = "复制到剪切板"; this.btClipboard.UseVisualStyleBackColor = true; this.btClipboard.Click += new System.EventHandler(this.btClipboard_Click); // @@ -225,7 +229,7 @@ private void InitializeComponent() this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(52, 15); this.label3.TabIndex = 0; - this.label3.Text = "Backend"; + this.label3.Text = "音频后端"; // // btSaveToProfile // @@ -234,7 +238,7 @@ private void InitializeComponent() this.btSaveToProfile.Name = "btSaveToProfile"; this.btSaveToProfile.Size = new System.Drawing.Size(295, 24); this.btSaveToProfile.TabIndex = 1; - this.btSaveToProfile.Text = "Save to Default FlexASIO.toml"; + this.btSaveToProfile.Text = "保存到默认FlexASIO.toml"; this.btSaveToProfile.UseVisualStyleBackColor = true; this.btSaveToProfile.Click += new System.EventHandler(this.btSaveToProfile_Click); // @@ -266,7 +270,7 @@ private void InitializeComponent() this.checkBoxSetOutputLatency.Name = "checkBoxSetOutputLatency"; this.checkBoxSetOutputLatency.Size = new System.Drawing.Size(127, 19); this.checkBoxSetOutputLatency.TabIndex = 19; - this.checkBoxSetOutputLatency.Text = "Set Output Latency"; + this.checkBoxSetOutputLatency.Text = "设置输出延迟"; this.checkBoxSetOutputLatency.UseVisualStyleBackColor = true; this.checkBoxSetOutputLatency.CheckedChanged += new System.EventHandler(this.checkBoxSetOutputLatency_CheckedChanged); // @@ -288,7 +292,7 @@ private void InitializeComponent() this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(50, 15); this.label7.TabIndex = 2; - this.label7.Text = "WASAPI"; + this.label7.Text = "WasAPI"; // // flowLayoutPanel2 // @@ -308,7 +312,7 @@ private void InitializeComponent() this.checkBoxWasapiInputSet.Name = "checkBoxWasapiInputSet"; this.checkBoxWasapiInputSet.Size = new System.Drawing.Size(45, 19); this.checkBoxWasapiInputSet.TabIndex = 9; - this.checkBoxWasapiInputSet.Text = "Set:"; + this.checkBoxWasapiInputSet.Text = "启用:"; this.checkBoxWasapiInputSet.UseVisualStyleBackColor = true; this.checkBoxWasapiInputSet.CheckedChanged += new System.EventHandler(this.checkBoxWasapiInputSet_CheckedChanged); // @@ -319,7 +323,7 @@ private void InitializeComponent() this.wasapiExclusiveInput.Name = "wasapiExclusiveInput"; this.wasapiExclusiveInput.Size = new System.Drawing.Size(74, 19); this.wasapiExclusiveInput.TabIndex = 7; - this.wasapiExclusiveInput.Text = "Exclusive"; + this.wasapiExclusiveInput.Text = "独占模式"; this.wasapiExclusiveInput.UseVisualStyleBackColor = true; this.wasapiExclusiveInput.CheckedChanged += new System.EventHandler(this.wasapiExclusiveInput_CheckedChanged); // @@ -332,7 +336,7 @@ private void InitializeComponent() this.wasapiAutoConvertInput.Name = "wasapiAutoConvertInput"; this.wasapiAutoConvertInput.Size = new System.Drawing.Size(94, 19); this.wasapiAutoConvertInput.TabIndex = 8; - this.wasapiAutoConvertInput.Text = "AutoConvert"; + this.wasapiAutoConvertInput.Text = "自动转换采样率"; this.wasapiAutoConvertInput.UseVisualStyleBackColor = true; this.wasapiAutoConvertInput.CheckedChanged += new System.EventHandler(this.wasapiAutoConvertInput_CheckedChanged); // @@ -354,7 +358,7 @@ private void InitializeComponent() this.checkBoxWasapiOutputSet.Name = "checkBoxWasapiOutputSet"; this.checkBoxWasapiOutputSet.Size = new System.Drawing.Size(45, 19); this.checkBoxWasapiOutputSet.TabIndex = 10; - this.checkBoxWasapiOutputSet.Text = "Set:"; + this.checkBoxWasapiOutputSet.Text = "启用:"; this.checkBoxWasapiOutputSet.UseVisualStyleBackColor = true; this.checkBoxWasapiOutputSet.CheckedChanged += new System.EventHandler(this.checkBoxWasapOutputSet_CheckedChanged); // @@ -365,7 +369,7 @@ private void InitializeComponent() this.wasapiExclusiveOutput.Name = "wasapiExclusiveOutput"; this.wasapiExclusiveOutput.Size = new System.Drawing.Size(74, 19); this.wasapiExclusiveOutput.TabIndex = 8; - this.wasapiExclusiveOutput.Text = "Exclusive"; + this.wasapiExclusiveOutput.Text = "独占模式"; this.wasapiExclusiveOutput.UseVisualStyleBackColor = true; this.wasapiExclusiveOutput.CheckedChanged += new System.EventHandler(this.wasapiExclusiveOutput_CheckedChanged); // @@ -378,7 +382,7 @@ private void InitializeComponent() this.wasapiAutoConvertOutput.Name = "wasapiAutoConvertOutput"; this.wasapiAutoConvertOutput.Size = new System.Drawing.Size(94, 19); this.wasapiAutoConvertOutput.TabIndex = 9; - this.wasapiAutoConvertOutput.Text = "AutoConvert"; + this.wasapiAutoConvertOutput.Text = "自动转换采样率"; this.wasapiAutoConvertOutput.UseVisualStyleBackColor = true; this.wasapiAutoConvertOutput.CheckedChanged += new System.EventHandler(this.wasapiAutoConvertOutput_CheckedChanged); // @@ -400,7 +404,7 @@ private void InitializeComponent() this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(73, 15); this.label1.TabIndex = 0; - this.label1.Text = "Input Device"; + this.label1.Text = "输入设备"; // // label2 // @@ -410,7 +414,7 @@ private void InitializeComponent() this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(83, 15); this.label2.TabIndex = 0; - this.label2.Text = "Output Device"; + this.label2.Text = "输出设备"; // // flowLayoutPanel5 // @@ -429,7 +433,7 @@ private void InitializeComponent() this.checkBoxSetInputLatency.Name = "checkBoxSetInputLatency"; this.checkBoxSetInputLatency.Size = new System.Drawing.Size(117, 19); this.checkBoxSetInputLatency.TabIndex = 20; - this.checkBoxSetInputLatency.Text = "Set Input Latency"; + this.checkBoxSetInputLatency.Text = "设置输入延迟"; this.checkBoxSetInputLatency.UseVisualStyleBackColor = true; this.checkBoxSetInputLatency.CheckedChanged += new System.EventHandler(this.checkBoxSetInputLatency_CheckedChanged); // @@ -451,7 +455,7 @@ private void InitializeComponent() this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(48, 15); this.label4.TabIndex = 2; - this.label4.Text = "Latency"; + this.label4.Text = "延迟"; // // label9 // @@ -462,7 +466,7 @@ private void InitializeComponent() this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(89, 15); this.label9.TabIndex = 13; - this.label9.Text = "Output Preview"; + this.label9.Text = "输出配置预览"; // // label5 // @@ -472,7 +476,7 @@ private void InitializeComponent() this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(56, 15); this.label5.TabIndex = 14; - this.label5.Text = "Channels"; + this.label5.Text = "声道"; // // numericChannelsInput // @@ -537,7 +541,7 @@ private void InitializeComponent() this.checkBoxSetBufferSize.Name = "checkBoxSetBufferSize"; this.checkBoxSetBufferSize.Size = new System.Drawing.Size(100, 19); this.checkBoxSetBufferSize.TabIndex = 7; - this.checkBoxSetBufferSize.Text = "Set Buffer Size"; + this.checkBoxSetBufferSize.Text = "启用缓冲区大小"; this.checkBoxSetBufferSize.UseVisualStyleBackColor = true; this.checkBoxSetBufferSize.CheckedChanged += new System.EventHandler(this.checkBoxSetBufferSize_CheckedChanged); // @@ -560,7 +564,7 @@ private void InitializeComponent() this.linkLabelDocs.Size = new System.Drawing.Size(217, 15); this.linkLabelDocs.TabIndex = 20; this.linkLabelDocs.TabStop = true; - this.linkLabelDocs.Text = "FlexASIO Configuration Documentation"; + this.linkLabelDocs.Text = "FlexASIO 配置参考文档"; this.linkLabelDocs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabelDocs.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelDocs_LinkClicked); // diff --git a/Form1.cs b/Form1.cs index a72f395..7bb935d 100644 --- a/Form1.cs +++ b/Form1.cs @@ -20,7 +20,7 @@ public partial class Form1 : Form private string TOMLPath; private FlexGUIConfig flexGUIConfig; private Encoding legacyEncoding; - private string flexasioGuiVersion = "0.34"; + private string flexasioGuiVersion = "EIMChanged"; private string flexasioVersion = "1.9"; private string tomlName = "FlexASIO.toml"; private string docUrl = "https://github.com/dechamps/FlexASIO/blob/master/CONFIGURATION.md"; @@ -34,7 +34,7 @@ public Form1() { InitializeComponent(); - this.Text = $"FlexASIO GUI v{flexasioGuiVersion}"; + this.Text = $"FlexASIO GUI {flexasioGuiVersion}"; System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone(); customCulture.NumberFormat.NumberDecimalSeparator = "."; @@ -125,7 +125,7 @@ private TreeNode[] GetDevicesForBackend(string Backend, bool Input) List treeNodes = new List(); treeNodes.Add(new TreeNode("(None)")); var devices = new MMDeviceEnumerator(); - if (Input) + if (!Input) { var enpoints = devices.EnumerateAudioEndPoints(DataFlow.Render, DeviceState.Active); foreach (var endpoint in enpoints) diff --git a/README.md b/README.md index ef2b60e..520d4d3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ +此分支对原项目做了以下修改: +- 修复中文乱码 +- 汉化中文界面 +- 将 PortAudio 替换为 NAudio 只支持获取 WASAPI 音频后端 + +by EIM + +对应的 FlexASIO 版本: [FlexASIO](https://github.com/dechamps/FlexASIO/releases/download/flexasio-1.9/FlexASIO-1.9.exe) + +--- + This is a small GUI to make the configuration of https://github.com/dechamps/FlexASIO a bit quicker. It should pick up your existing $Usersprofile/FlexASIO.toml file and read the basic parameters. Not all of them have been implemented yet... diff --git a/installer/FlexASIOGUI.iss b/installer/FlexASIOGUI.iss index e4a077f..00757aa 100644 --- a/installer/FlexASIOGUI.iss +++ b/installer/FlexASIOGUI.iss @@ -1,5 +1,5 @@ #define MyAppName "FlexASIO GUI" -#define MyAppVersion "0.34" +#define MyAppVersion "EIMChanged" #define MyAppPublisher "https://github.com/flipswitchingmonkey/FlexASIO_GUI" #define MyAppURL "" #define MyAppExeName "FlexASIOGUI.exe"