Skip to content

Commit

Permalink
Merge pull request #586 from naudio/netcore3
Browse files Browse the repository at this point in the history
Netcore3
  • Loading branch information
markheath authored Jan 31, 2020
2 parents 4362fa3 + 13516bf commit 6bd2dee
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 672 deletions.
34 changes: 29 additions & 5 deletions NAudio/NAudio.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>net35;netstandard2.0;uap10.0</TargetFrameworks>
<Version>1.9.0</Version>
<TargetFrameworks>netcoreapp3.0;net35;netstandard2.0;uap10.0</TargetFrameworks>
<Version>1.10.0</Version>
<Authors>Mark Heath &amp; Contributors</Authors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>NAudio, an audio library for .NET</Description>
<PackageLicenseUrl>https://github.com/naudio/NAudio/blob/master/license.txt</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/naudio/NAudio</PackageProjectUrl>
<PackageTags>C# .NET audio sound</PackageTags>
<RepositoryUrl>https://github.com/naudio/NAudio</RepositoryUrl>
<Copyright>© Mark Heath 2019</Copyright>
<Copyright>© Mark Heath 2020</Copyright>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
Expand All @@ -32,8 +36,13 @@
<Compile Remove="Wave\MmeInterop\WaveCallbackInfo.cs" />
<Compile Remove="Wave\WaveInputs\WaveIn.cs" />
<Compile Remove="Wave\WaveOutputs\WaveOut.cs" />
<Compile Remove="Wave\WaveOutputs\AsioOut.cs" />
<Compile Remove="Wave\WaveOutputs\AsioAudioAvailableEventArgs.cs" />
<Compile Remove="Wave\WaveFormats\WaveFormatCustomMarshaler.cs" />
<Compile Remove="Wave\WaveOutputs\WasapiOutRT.cs" />
<Compile Remove="Wave\WaveInputs\WasapiCaptureRT.cs" />
<Compile Remove="Wave\WaveOutputs\WaveFileWriterRT.cs" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<Compile Remove="Wave\WaveFormats\WaveFormatCustomMarshaler.cs" />
<Compile Remove="Wave\WaveOutputs\WasapiOutRT.cs" />
<Compile Remove="Wave\WaveInputs\WasapiCaptureRT.cs" />
Expand Down Expand Up @@ -73,4 +82,19 @@
<Compile Remove="Dmo\Effect\*.cs" />
<Compile Remove="Wave\WaveProviders\DmoEffectWaveProvider.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Win32.Registry">
<Version>4.7.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<PackageReference Include="Microsoft.Win32.Registry">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Resources.Extensions">
<Version>4.7.0</Version>
</PackageReference>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion NAudio/Wave/Asio/ASIODriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private AsioDriver()
{
}

#if NET35
#if NETSTANDARD2_0 || NET35 || NETCOREAPP3_0
/// <summary>
/// Gets the ASIO driver names installed.
/// </summary>
Expand Down
6 changes: 5 additions & 1 deletion NAudioDemo/MainForm.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Linq;
using System.Reflection;
using System.Runtime.Versioning;
using System.Windows.Forms;
using NAudioDemo.Utils;

Expand All @@ -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})";
}


Expand Down
Loading

0 comments on commit 6bd2dee

Please sign in to comment.