diff --git a/FlexASIOGUI.csproj b/FlexASIOGUI.csproj index 8a1cca5..a3ff05b 100644 --- a/FlexASIOGUI.csproj +++ b/FlexASIOGUI.csproj @@ -4,15 +4,17 @@ WinExe netcoreapp3.1 true + AnyCPU;x64 + - lib\portaudio-sharp.dll + lib\Debug\portaudio-sharp.dll diff --git a/FlexASIOGUI.sln b/FlexASIOGUI.sln index 88e4ed1..b5fdc60 100644 --- a/FlexASIOGUI.sln +++ b/FlexASIOGUI.sln @@ -3,18 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlexASIOGUI", "FlexASIOGUI.csproj", "{3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlexASIOGUI", "FlexASIOGUI.csproj", "{3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Debug|x64.ActiveCfg = Debug|x64 + {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Debug|x64.Build.0 = Debug|x64 {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Release|Any CPU.ActiveCfg = Release|Any CPU {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Release|Any CPU.Build.0 = Release|Any CPU + {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Release|x64.ActiveCfg = Release|x64 + {3379A106-E2A5-4B28-92D0-D4E37D4ABCCF}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Form1.cs b/Form1.cs index ea641f6..9516a38 100644 --- a/Form1.cs +++ b/Form1.cs @@ -21,13 +21,18 @@ public partial class Form1 : Form private bool InitDone = false; private string TOMLPath; private FlexGUIConfig flexGUIConfig; + private System.Text.Encoding enc1252; public Form1() { InitializeComponent(); + this.Text = "FlexASIO GUI v0.2"; + System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone(); customCulture.NumberFormat.NumberDecimalSeparator = "."; + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + enc1252 = Encoding.GetEncoding(1252); System.Threading.Thread.CurrentThread.CurrentCulture = customCulture; CultureInfo.DefaultThreadCurrentCulture = customCulture; @@ -48,8 +53,6 @@ public Form1() numericLatencyInput.Increment = 0.1m; numericLatencyOutput.Increment = 0.1m; - PortAudioInterop.Pa_Initialize(); - for (var i=0; i treeNodes = new List(); @@ -94,6 +104,7 @@ private TreeNode[] GetDevicesForBackend(string Backend, bool Input) for (var i = 0; i < Configuration.DeviceCount; i++) { var deviceInfo = Configuration.GetDeviceInfo(i); + var apiInfo = Configuration.GetHostApiInfo(deviceInfo.hostApi); if (apiInfo.name != Backend) @@ -103,14 +114,14 @@ private TreeNode[] GetDevicesForBackend(string Backend, bool Input) { if (deviceInfo.maxInputChannels > 0) { - treeNodes.Add(new TreeNode(deviceInfo.name)); + treeNodes.Add(new TreeNode(W1252fromUTF(deviceInfo.name))); } } else { if (deviceInfo.maxOutputChannels > 0) { - treeNodes.Add(new TreeNode(deviceInfo.name)); + treeNodes.Add(new TreeNode(W1252fromUTF(deviceInfo.name))); } } } @@ -145,46 +156,6 @@ private void GenerateOutput() { if (!InitDone) return; - // Old manual way of writing the config file... - - //StringBuilder config = new StringBuilder(); - //var backend = comboBackend.SelectedItem.ToString(); - //var input = treeDevicesInput?.SelectedNode?.Text; - //var output = treeDevicesOutput?.SelectedNode?.Text; - //var inputLatency = numericLatencyInput.Value.ToString(); - //var outputLatency = numericLatencyOutput.Value.ToString(); - - //config.AppendLine($"# Host API backend"); - //config.AppendLine($"backend = \"{comboBackend.SelectedItem?.ToString()}\""); - //config.AppendLine($"bufferSizeSamples = {numericBufferSize?.Value.ToString()}"); - //config.AppendLine(""); - //config.AppendLine($"[input]"); - //if (input == "(None)") - // config.AppendLine($"device = \"\""); - //else - // config.AppendLine($"device = \"{treeDevicesInput?.SelectedNode?.Text}\""); - //if (numericChannelsInput.Value > 0) - //{ - // config.AppendLine($"channels = {numericChannelsInput?.Value.ToString()}"); - //} - //config.AppendLine($"suggestedLatencySeconds = {numericLatencyInput?.Value.ToString("0.0", new CultureInfo("en-US"))}"); - //config.AppendLine($"wasapiExclusiveMode = {wasapiExclusiveInput?.Checked.ToString().ToLower()}"); - //config.AppendLine($"wasapiAutoConvert = {wasapiAutoConvertInput?.Checked.ToString().ToLower()}"); - //config.AppendLine(""); - //config.AppendLine($"[output]"); - //if (output == "(None)") - // config.AppendLine($"device = \"\""); - //else - // config.AppendLine($"device = \"{treeDevicesOutput?.SelectedNode?.Text}\""); - //if (numericChannelsOutput.Value > 0) - //{ - // config.AppendLine($"channels = {numericChannelsOutput?.Value.ToString()}"); - //} - //config.AppendLine($"suggestedLatencySeconds = {numericLatencyOutput?.Value.ToString("0.0", new CultureInfo("en-US"))}"); - //config.AppendLine($"wasapiExclusiveMode = {wasapiExclusiveOutput?.Checked.ToString().ToLower()}"); - //config.AppendLine($"wasapiAutoConvert = {wasapiAutoConvertOutput?.Checked.ToString().ToLower()}"); - //configOutput.Text = config.ToString(); - configOutput.Clear(); configOutput.Text = Toml.WriteString(flexGUIConfig); } diff --git a/installer/FlexASIOGUI.iss b/installer/FlexASIOGUI.iss index 4a999f0..7271a18 100644 --- a/installer/FlexASIOGUI.iss +++ b/installer/FlexASIOGUI.iss @@ -1,5 +1,5 @@ #define MyAppName "FlexASIO GUI" -#define MyAppVersion "0.1" +#define MyAppVersion "0.2" #define MyAppPublisher "https://github.com/flipswitchingmonkey/FlexASIO_GUI" #define MyAppURL "" #define MyAppExeName "FlexASIOGUI.exe" @@ -32,7 +32,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" ;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] -Source: "..\bin\Release\netcoreapp3.1\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs +Source: "..\bin\x64\Release\netcoreapp3.1\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] diff --git a/lib/portaudio_x64.dll b/lib/portaudio_x64.dll index 40fd4a4..931566e 100644 Binary files a/lib/portaudio_x64.dll and b/lib/portaudio_x64.dll differ diff --git a/lib/portaudio_x64.pdb b/lib/portaudio_x64.pdb index 49d74dd..5b25263 100644 Binary files a/lib/portaudio_x64.pdb and b/lib/portaudio_x64.pdb differ