diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-03-15 21:06:24 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-15 21:06:24 -0300 |
| commit | 79a59397349b40758fc75cd2e19c67726a77e975 (patch) | |
| tree | 4597fcdf8d8d6886df88c00650b7d924c7fc16fe /Ryujinx.Core/Switch.cs | |
| parent | 92f47d535e7c3b350c25499dec5e91d8be5544bc (diff) | |
Improvements to audout (#58)
* Some audout refactoring and improvements
* More audio improvements
* Change ReadAsciiString to use long for the Size, avoids some casting
Diffstat (limited to 'Ryujinx.Core/Switch.cs')
| -rw-r--r-- | Ryujinx.Core/Switch.cs | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/Ryujinx.Core/Switch.cs b/Ryujinx.Core/Switch.cs index 487f3bdb..92d78f45 100644 --- a/Ryujinx.Core/Switch.cs +++ b/Ryujinx.Core/Switch.cs @@ -1,3 +1,4 @@ +using Ryujinx.Audio; using Ryujinx.Core.Input; using Ryujinx.Core.OsHle; using Ryujinx.Core.Settings; @@ -9,32 +10,50 @@ namespace Ryujinx.Core { public class Switch : IDisposable { - internal NsGpu Gpu { get; private set; } - internal Horizon Os { get; private set; } - internal VirtualFs VFs { get; private set; } + internal IAalOutput AudioOut { get; private set; } + + internal NsGpu Gpu { get; private set; } + + internal Horizon Os { get; private set; } + + internal VirtualFileSystem VFs { get; private set; } + + public SystemSettings Settings { get; private set; } - public Hid Hid { get; private set; } - public SetSys Settings { get; private set; } public PerformanceStatistics Statistics { get; private set; } + public Hid Hid { get; private set; } + public event EventHandler Finish; - public Switch(IGalRenderer Renderer) + public Switch(IGalRenderer Renderer, IAalOutput AudioOut) { + if (Renderer == null) + { + throw new ArgumentNullException(nameof(Renderer)); + } + + if (AudioOut == null) + { + throw new ArgumentNullException(nameof(AudioOut)); + } + + this.AudioOut = AudioOut; + Gpu = new NsGpu(Renderer); - VFs = new VirtualFs(); + Os = new Horizon(this); - Hid = new Hid(); + VFs = new VirtualFileSystem(); + + Settings = new SystemSettings(); Statistics = new PerformanceStatistics(); - Os = new Horizon(this); + Hid = new Hid(); Os.HidSharedMem.MemoryMapped += Hid.ShMemMap; Os.HidSharedMem.MemoryUnmapped += Hid.ShMemUnmap; - - Settings = new SetSys(); } public void LoadCart(string ExeFsDir, string RomFsFile = null) |
