diff --git a/RedBookPlayer.GUI/RedBookPlayer.GUI.csproj b/RedBookPlayer.GUI/RedBookPlayer.GUI.csproj
index 22e946e..c0be0a2 100644
--- a/RedBookPlayer.GUI/RedBookPlayer.GUI.csproj
+++ b/RedBookPlayer.GUI/RedBookPlayer.GUI.csproj
@@ -9,6 +9,7 @@
WindowsDebug
+
%(Filename)
diff --git a/RedBookPlayer.Models/Hardware/SoundOutput.cs b/RedBookPlayer.Models/Hardware/SoundOutput.cs
index ed6c71d..27a1047 100644
--- a/RedBookPlayer.Models/Hardware/SoundOutput.cs
+++ b/RedBookPlayer.Models/Hardware/SoundOutput.cs
@@ -1,5 +1,6 @@
using System;
using System.Linq;
+using System.Runtime.InteropServices;
using System.Threading.Tasks;
using ReactiveUI;
using RedBookPlayer.Models.Discs;
@@ -118,7 +119,6 @@ namespace RedBookPlayer.Models.Hardware
Volume = defaultVolume;
_filterStage = new FilterStage();
}
-
///
/// Initialize the output with a given image
@@ -367,13 +367,10 @@ namespace RedBookPlayer.Models.Hardware
{
_source = new PlayerSource(ProviderRead);
-#if LINUX
- _soundOut = new Linux.AudioBackend(_source);
-#elif MACOS
- _soundOut = new Mac.AudioBackend(_source);
-#elif WINDOWS
- _soundOut = new Windows.AudioBackend(_source);
-#endif
+ if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ _soundOut = new Linux.AudioBackend(_source);
+ else if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ _soundOut = new Windows.AudioBackend(_source);
}
else
{
diff --git a/RedBookPlayer.Models/RedBookPlayer.Models.csproj b/RedBookPlayer.Models/RedBookPlayer.Models.csproj
index 4b505f2..c0a4c68 100644
--- a/RedBookPlayer.Models/RedBookPlayer.Models.csproj
+++ b/RedBookPlayer.Models/RedBookPlayer.Models.csproj
@@ -2,19 +2,11 @@
netcoreapp3.1
+ win-x64;linux-x64
+ linux-x64
true
-
- LINUX
-
-
- MAC
-
-
- WINDOWS
-
-