diff --git a/NAudio/NAudio.csproj b/NAudio/NAudio.csproj index bbb13c10..e15416b8 100644 --- a/NAudio/NAudio.csproj +++ b/NAudio/NAudio.csproj @@ -1,7 +1,7 @@  - net35;netstandard2.0;uap10.0 - 1.9.0 + netcoreapp3.0;net35;netstandard2.0;uap10.0 + 1.10.0 Mark Heath & Contributors true NAudio, an audio library for .NET @@ -9,11 +9,15 @@ https://github.com/naudio/NAudio C# .NET audio sound https://github.com/naudio/NAudio - © Mark Heath 2019 + © Mark Heath 2020 true true + + true + + @@ -32,8 +36,13 @@ - - + + + + + + + @@ -73,4 +82,19 @@ + + + + 4.7.0 + + + + + + 4.7.0 + + + 4.7.0 + + \ No newline at end of file diff --git a/NAudio/Wave/Asio/ASIODriver.cs b/NAudio/Wave/Asio/ASIODriver.cs index abbe2cdc..6c7b3ded 100644 --- a/NAudio/Wave/Asio/ASIODriver.cs +++ b/NAudio/Wave/Asio/ASIODriver.cs @@ -23,7 +23,7 @@ private AsioDriver() { } -#if NET35 +#if NETSTANDARD2_0 || NET35 || NETCOREAPP3_0 /// /// Gets the ASIO driver names installed. /// diff --git a/NAudioDemo/MainForm.cs b/NAudioDemo/MainForm.cs index ce25c6b6..8683abcd 100644 --- a/NAudioDemo/MainForm.cs +++ b/NAudioDemo/MainForm.cs @@ -1,5 +1,7 @@ using System; using System.Linq; +using System.Reflection; +using System.Runtime.Versioning; using System.Windows.Forms; using NAudioDemo.Utils; @@ -21,7 +23,9 @@ public MainForm() listBoxDemos.Items.Add(demo); } - Text += ((System.Runtime.InteropServices.Marshal.SizeOf(IntPtr.Zero) == 8) ? " (x64)" : " (x86)"); + var arch = Environment.Is64BitProcess ? "x64" : "x86"; + var framework = ((TargetFrameworkAttribute)(Assembly.GetEntryAssembly().GetCustomAttributes(typeof(TargetFrameworkAttribute),true).ToArray()[0])).FrameworkName; + this.Text = $"{this.Text} ({framework}) ({arch})"; } diff --git a/NAudioDemo/NAudioDemo.csproj b/NAudioDemo/NAudioDemo.csproj index 189f9425..2b8f2aab 100644 --- a/NAudioDemo/NAudioDemo.csproj +++ b/NAudioDemo/NAudioDemo.csproj @@ -1,21 +1,14 @@  - + - Debug - AnyCPU + netcoreapp3.0;net40-client;net48 9.0.30729 2.0 - {C37A547B-F31E-45FB-870A-CFA704D06152} WinExe Properties NAudioDemo NAudioDemo - - - - 3.5 - v4.0 publish\ true Disk @@ -31,28 +24,13 @@ false false true - Client - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - AnyCPU - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - x86 + NAudioDemo + 1.0.0.0 + 1.0.0.0 + NAudioDemo + NAudioDemo + 1.0.0.0 + true @@ -66,277 +44,17 @@ - - UserControl - - - AcmPanel.cs - - - UserControl - - - AsioDirectPanel.cs - - - UserControl - - - AsioRecordingPanel.cs - - - - UserControl - - - AsioOutSettingsPanel.cs - - - UserControl - - - AudioPlaybackPanel.cs - - - - UserControl - - - DirectSoundOutSettingsPanel.cs - - - - - - UserControl - - - WasapiOutSettingsPanel.cs - - - - UserControl - - - WaveOutSettingsPanel.cs - - - - Images.resx - True - True - - - - - Form - - - MainForm.cs - - - UserControl - - - MediaFoundationDemoPanel.cs - - - - UserControl - - - MidiInPanel.cs - - - UserControl - - - MP3StreamingPanel.cs - - - - - - - - - - - - - - UserControl - - - NetworkChatPanel.cs - - - - - - - - - - UserControl - - - FadeInOutPanel.cs - - - UserControl - - - GeneratorPanel.cs - - - - UserControl - - - SimplePlaybackPanel.cs - - - - - - - - UserControl - - - VolumeMixerPanel.cs - - - - UserControl - - - VolumePanel.cs - - - AcmPanel.cs - Designer - - - AsioDirectPanel.cs - - - AsioRecordingPanel.cs - - - AsioOutSettingsPanel.cs - - - AudioPlaybackPanel.cs - Designer - - - DirectSoundOutSettingsPanel.cs - - - WasapiOutSettingsPanel.cs - - - WaveOutSettingsPanel.cs - - - ResXFileCodeGenerator - Images.Designer.cs - Designer - - - Designer - MainForm.cs - - - MediaFoundationDemoPanel.cs - - - Designer - MidiInPanel.cs - - - MP3StreamingPanel.cs - - - NetworkChatPanel.cs - - - FadeInOutPanel.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - RecordingPanel.cs - Designer - - - True - Resources.resx - True - - - GeneratorPanel.cs - - - SimplePlaybackPanel.cs - - - VolumePanel.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - UserControl - - - RecordingPanel.cs - - - - - {DA4F02E3-0B5E-42CD-B8D9-5583FA51D66E} - NAudio - + - - - - - - - - - - - - - - - - @@ -360,12 +78,4 @@ - - \ No newline at end of file diff --git a/NAudioDemo/NAudioDemo.csproj.user b/NAudioDemo/NAudioDemo.csproj.user deleted file mode 100644 index 566c009a..00000000 --- a/NAudioDemo/NAudioDemo.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - ShowAllFiles - - \ No newline at end of file diff --git a/NAudioDemo/Properties/AssemblyInfo.cs b/NAudioDemo/Properties/AssemblyInfo.cs deleted file mode 100644 index b7d1c787..00000000 --- a/NAudioDemo/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NAudioDemo")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NAudioDemo")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6f558ff4-35cc-4cdc-8767-ca7f3b679f13")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NAudioDemo/VolumeMixerDemo/VolumeMixerPanel.cs b/NAudioDemo/VolumeMixerDemo/VolumeMixerPanel.cs index 4a2dc4e4..688ee6db 100644 --- a/NAudioDemo/VolumeMixerDemo/VolumeMixerPanel.cs +++ b/NAudioDemo/VolumeMixerDemo/VolumeMixerPanel.cs @@ -4,7 +4,9 @@ using System.Drawing; using System.Data; using System.Linq; +#if NET35 using System.Runtime.Remoting.Messaging; +#endif using System.Text; using System.Windows.Forms; using NAudio.CoreAudioApi; diff --git a/NAudioWpfDemo/MainWindow.xaml.cs b/NAudioWpfDemo/MainWindow.xaml.cs index bcbff723..684d5786 100644 --- a/NAudioWpfDemo/MainWindow.xaml.cs +++ b/NAudioWpfDemo/MainWindow.xaml.cs @@ -3,6 +3,11 @@ namespace NAudioWpfDemo { + using System; + using System.Reflection; + using System.Runtime.InteropServices; + using System.Runtime.Versioning; + /// /// Interaction logic for MainWindow.xaml /// @@ -11,7 +16,9 @@ public partial class MainWindow : Window public MainWindow() { InitializeComponent(); - this.Title = this.Title + ((System.Runtime.InteropServices.Marshal.SizeOf(IntPtr.Zero) == 8) ? " (x64)" : " (x86)"); + var arch = Environment.Is64BitProcess ? "x64" : "x86"; + var framework = Assembly.GetEntryAssembly().GetCustomAttribute().FrameworkName; + this.Title = $"{this.Title} ({framework}) ({arch})"; } } } diff --git a/NAudioWpfDemo/MediaFoundationEncode/MediaFoundationEncodeViewModel.cs b/NAudioWpfDemo/MediaFoundationEncode/MediaFoundationEncodeViewModel.cs index fca93b92..7449956c 100644 --- a/NAudioWpfDemo/MediaFoundationEncode/MediaFoundationEncodeViewModel.cs +++ b/NAudioWpfDemo/MediaFoundationEncode/MediaFoundationEncodeViewModel.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; -using System.Windows.Forms; +using System.Windows; using System.Windows.Input; -using MS.Internal.Xml.XPath; using NAudio.MediaFoundation; using NAudio.Wave; using NAudioWpfDemo.ViewModel; @@ -78,7 +77,7 @@ private bool TryOpenInputFile(string file) } catch (Exception e) { - MessageBox.Show(String.Format("Not a supported input file ({0})", e.Message)); + MessageBox.Show($"Not a supported input file ({e.Message})"); } return isValid; } diff --git a/NAudioWpfDemo/MediaFoundationPlayback/MediaFoundationPlaybackViewModel.cs b/NAudioWpfDemo/MediaFoundationPlayback/MediaFoundationPlaybackViewModel.cs index dd378ec7..cdf68b86 100644 --- a/NAudioWpfDemo/MediaFoundationPlayback/MediaFoundationPlaybackViewModel.cs +++ b/NAudioWpfDemo/MediaFoundationPlayback/MediaFoundationPlaybackViewModel.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Windows.Forms; +using System.Windows; using System.Windows.Threading; using NAudio.Wave; using NAudioWpfDemo.ViewModel; diff --git a/NAudioWpfDemo/NAudioWpfDemo.csproj b/NAudioWpfDemo/NAudioWpfDemo.csproj index de1fb1eb..15c9a13c 100644 --- a/NAudioWpfDemo/NAudioWpfDemo.csproj +++ b/NAudioWpfDemo/NAudioWpfDemo.csproj @@ -1,9 +1,7 @@  - - + - Debug - AnyCPU + netcoreapp3.0;net45;net48 9.0.30729 2.0 {A7B74F85-D353-4ED4-A321-E6E4AD4D7D32} @@ -11,14 +9,14 @@ Properties NAudioWpfDemo NAudioWpfDemo - v4.5 + NAudioWpfDemo + 1.0.0.0 + 1.0.0 + NAudioWpfDemo + NAudioWpfDemo + 1.0.0.0 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - 3.5 - publish\ true Disk @@ -34,38 +32,9 @@ false false true - - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - x86 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - x86 - false + true - - ..\packages\NUnit.3.10.1\lib\net40\nunit.framework.dll - 3.5 @@ -89,215 +58,6 @@ 3.0 - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - App.xaml - Code - - - - AudioPlaybackDemoView.xaml - - - - - - - - - DrumMachineDemoView.xaml - - - - - DrumPatternEditor.xaml - - - - - - - - - EnumMftView.xaml - - - - - EqualizationDemoView.xaml - - - - - - - - - - - FireAndForgetPlaybackView.xaml - - - - - MainWindow.xaml - Code - - - - - - - - - MediaFoundationEncodeView.xaml - - - - - MediaFoundationPlaybackView.xaml - - - - - - MediaFoundationResampleView.xaml - - - - - PolygonWaveFormControl.xaml - - - - PolylineWaveFormControl.xaml - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - SpectrumAnalyser.xaml - - - - - - - RecordingsView.xaml - - - - - WasapiCaptureDemoView.xaml - - - - WaveFormControl.xaml - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - {DA4F02E3-0B5E-42CD-B8D9-5583FA51D66E} @@ -344,20 +104,6 @@ - + - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/NAudioWpfDemo/Properties/AssemblyInfo.cs b/NAudioWpfDemo/Properties/AssemblyInfo.cs deleted file mode 100644 index 6f0096b2..00000000 --- a/NAudioWpfDemo/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NAudioWpfDemo")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NAudioWpfDemo")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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")] diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f05be062..839cec67 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,9 +2,10 @@ # Build and run tests for .NET Desktop or Windows classic desktop solutions. # Add steps that publish symbols, save build artifacts, and more: # https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net +# vmImage options: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#use-a-microsoft-hosted-agent pool: - vmImage: 'VS2017-Win2016' + vmImage: 'windows-2019' variables: solution: '**/*.sln' diff --git a/global.json b/global.json index dc03d9ee..80d84a25 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "MSBuild.Sdk.Extras": "2.0.31" + "MSBuild.Sdk.Extras": "2.0.54" } } \ No newline at end of file