Split common and GUI code into separate projects

This commit is contained in:
Matt Nadareski
2021-07-05 13:20:06 -07:00
parent 30e4573be6
commit 4efc58d0ef
35 changed files with 54 additions and 23 deletions

View File

@@ -9,7 +9,7 @@ using Aaru.Helpers;
using ReactiveUI; using ReactiveUI;
using static Aaru.Decoders.CD.FullTOC; using static Aaru.Decoders.CD.FullTOC;
namespace RedBookPlayer.Discs namespace RedBookPlayer.Common.Discs
{ {
public class CompactDisc : OpticalDisc, IReactiveObject public class CompactDisc : OpticalDisc, IReactiveObject
{ {

View File

@@ -2,7 +2,7 @@ using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Interfaces;
using ReactiveUI; using ReactiveUI;
namespace RedBookPlayer.Discs namespace RedBookPlayer.Common.Discs
{ {
public abstract class OpticalDisc : ReactiveObject public abstract class OpticalDisc : ReactiveObject
{ {

View File

@@ -4,7 +4,7 @@ using Aaru.CommonTypes.Metadata;
using Aaru.DiscImages; using Aaru.DiscImages;
using Aaru.Filters; using Aaru.Filters;
namespace RedBookPlayer.Discs namespace RedBookPlayer.Common.Discs
{ {
public static class OpticalDiscFactory public static class OpticalDiscFactory
{ {

View File

@@ -1,7 +1,7 @@
using System; using System;
using NWaves.Filters.BiQuad; using NWaves.Filters.BiQuad;
namespace RedBookPlayer.Hardware namespace RedBookPlayer.Common.Hardware
{ {
/// <summary> /// <summary>
/// Filter for applying de-emphasis to audio /// Filter for applying de-emphasis to audio

View File

@@ -2,9 +2,9 @@ using System;
using System.ComponentModel; using System.ComponentModel;
using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Enums;
using ReactiveUI; using ReactiveUI;
using RedBookPlayer.Discs; using RedBookPlayer.Common.Discs;
namespace RedBookPlayer.Hardware namespace RedBookPlayer.Common.Hardware
{ {
public class Player : ReactiveObject public class Player : ReactiveObject
{ {

View File

@@ -2,7 +2,7 @@ using System;
using CSCore; using CSCore;
using WaveFormat = CSCore.WaveFormat; using WaveFormat = CSCore.WaveFormat;
namespace RedBookPlayer.Hardware namespace RedBookPlayer.Common.Hardware
{ {
public class PlayerSource : IWaveSource public class PlayerSource : IWaveSource
{ {

View File

@@ -5,9 +5,9 @@ using CSCore.SoundOut;
using NWaves.Audio; using NWaves.Audio;
using NWaves.Filters.BiQuad; using NWaves.Filters.BiQuad;
using ReactiveUI; using ReactiveUI;
using RedBookPlayer.Discs; using RedBookPlayer.Common.Discs;
namespace RedBookPlayer.Hardware namespace RedBookPlayer.Common.Hardware
{ {
public class SoundOutput : ReactiveObject public class SoundOutput : ReactiveObject
{ {

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia.ReactiveUI" Version="0.9.12" />
<PackageReference Include="NWaves" Version="0.9.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aaru\Aaru.Images\Aaru.Images.csproj" />
<ProjectReference Include="..\Aaru\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
<ProjectReference Include="..\Aaru\Aaru.Decoders\Aaru.Decoders.csproj" />
<ProjectReference Include="..\cscore\CSCore\CSCore.csproj" />
</ItemGroup>
</Project>

View File

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

View File

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 658 B

View File

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

View File

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 604 B

View File

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 595 B

View File

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 550 B

View File

Before

Width:  |  Height:  |  Size: 601 B

After

Width:  |  Height:  |  Size: 601 B

View File

Before

Width:  |  Height:  |  Size: 656 B

After

Width:  |  Height:  |  Size: 656 B

View File

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 547 B

View File

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

View File

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 648 B

View File

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 407 B

View File

@@ -1,6 +1,6 @@
using System.ComponentModel; using System.ComponentModel;
using ReactiveUI; using ReactiveUI;
using RedBookPlayer.Hardware; using RedBookPlayer.Common.Hardware;
namespace RedBookPlayer.GUI namespace RedBookPlayer.GUI
{ {

View File

@@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
using Avalonia; using Avalonia;
using Avalonia.Logging.Serilog; using Avalonia.Logging.Serilog;
namespace RedBookPlayer namespace RedBookPlayer.GUI
{ {
internal class Program internal class Program
{ {

View File

@@ -2,8 +2,8 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<DebugType>embedded</DebugType> <DebugType>embedded</DebugType>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)|$(Configuration)' == 'win-x64|Debug'"> <PropertyGroup Condition="'$(RuntimeIdentifier)|$(Configuration)' == 'win-x64|Debug'">
@@ -21,17 +21,9 @@
<PackageReference Include="Avalonia" Version="0.9.12" /> <PackageReference Include="Avalonia" Version="0.9.12" />
<PackageReference Include="Avalonia.Desktop" Version="0.9.12" /> <PackageReference Include="Avalonia.Desktop" Version="0.9.12" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.9.12" /> <PackageReference Include="Avalonia.ReactiveUI" Version="0.9.12" />
<PackageReference Include="NWaves" Version="0.9.4" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="1.68.3" />
<PackageReference Include="Avalonia.Skia.Linux.Natives" Version="1.68.0.2" ExcludeAssets="all" />
<PackageReference Include="SkiaSharp" Version="1.68.3" />
<PackageReference Include="OpenTK.NetStandard" Version="1.0.5.12" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Aaru\Aaru.Images\Aaru.Images.csproj" /> <ProjectReference Include="..\RedBookPlayer.Common\RedBookPlayer.Common.csproj" />
<ProjectReference Include="..\Aaru\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
<ProjectReference Include="..\Aaru\Aaru.Decoders\Aaru.Decoders.csproj" />
<ProjectReference Include="..\cscore\CSCore\CSCore.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AvaloniaResource Include="Assets\*" /> <AvaloniaResource Include="Assets\*" />

View File

@@ -4,7 +4,7 @@ using System.Text.Json;
using Avalonia.Input; using Avalonia.Input;
using RedBookPlayer.GUI; using RedBookPlayer.GUI;
namespace RedBookPlayer namespace RedBookPlayer.GUI
{ {
public class Settings public class Settings
{ {

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AvaloniaCI" value="https://www.myget.org/F/avalonia-ci/api/v2" />
</packageSources>
</configuration>

View File

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.31321.278 VisualStudioVersion = 16.0.31321.278
MinimumVisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RedBookPlayer", "RedBookPlayer\RedBookPlayer.csproj", "{94944959-0352-4ABF-9C5C-19FF33747ECE}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RedBookPlayer.GUI", "RedBookPlayer.GUI\RedBookPlayer.GUI.csproj", "{94944959-0352-4ABF-9C5C-19FF33747ECE}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cscore", "cscore", "{9A371299-4C59-4E46-9C3B-4FE024017491}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cscore", "cscore", "{9A371299-4C59-4E46-9C3B-4FE024017491}"
EndProject EndProject
@@ -40,6 +40,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md README.md = README.md
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedBookPlayer.Common", "RedBookPlayer.Common\RedBookPlayer.Common.csproj", "{462A3B8E-A5D4-4539-8469-1647B47AB2A8}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -194,6 +196,18 @@ Global
{ED8E11B7-786F-4EFF-9E4C-B937B7A2DE89}.Release|x64.Build.0 = Release|Any CPU {ED8E11B7-786F-4EFF-9E4C-B937B7A2DE89}.Release|x64.Build.0 = Release|Any CPU
{ED8E11B7-786F-4EFF-9E4C-B937B7A2DE89}.Release|x86.ActiveCfg = Release|Any CPU {ED8E11B7-786F-4EFF-9E4C-B937B7A2DE89}.Release|x86.ActiveCfg = Release|Any CPU
{ED8E11B7-786F-4EFF-9E4C-B937B7A2DE89}.Release|x86.Build.0 = Release|Any CPU {ED8E11B7-786F-4EFF-9E4C-B937B7A2DE89}.Release|x86.Build.0 = Release|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Debug|x64.ActiveCfg = Debug|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Debug|x64.Build.0 = Debug|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Debug|x86.ActiveCfg = Debug|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Debug|x86.Build.0 = Debug|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Release|Any CPU.Build.0 = Release|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Release|x64.ActiveCfg = Release|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Release|x64.Build.0 = Release|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Release|x86.ActiveCfg = Release|Any CPU
{462A3B8E-A5D4-4539-8469-1647B47AB2A8}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE