I'm compiling PortAudio.Net using Mono since I'd like to use it in a project on Linux.
Unfortunately PaBuffer.Span is not available there, since this #if in PaBuffer.cs excludes it:
#if NETCOREAPP
/// ...
/// <remarks>
/// Due to its safety and efficiency, <see cref="Span<T>"/> is the preferred means of accessing the memory.
/// However, this property is not available in .NET Framework, only .NET Core.
/// </remarks>
public Span<T> Span
...
#endif
In my opinion it would be better to omit the #if altogether, since Span\<T> works on Mono, and there is a NuGet package that provides Span\<T> for .NET Framework (https://stackoverflow.com/a/60559862/4034070), so this functionailty is now effectively available there as well.
I'm compiling PortAudio.Net using Mono since I'd like to use it in a project on Linux.
Unfortunately PaBuffer.Span is not available there, since this #if in PaBuffer.cs excludes it:
In my opinion it would be better to omit the #if altogether, since Span\<T> works on Mono, and there is a NuGet package that provides Span\<T> for .NET Framework (https://stackoverflow.com/a/60559862/4034070), so this functionailty is now effectively available there as well.