Improvements to audout (#58)

* Some audout refactoring and improvements

* More audio improvements

* Change ReadAsciiString to use long for the Size, avoids some casting
This commit is contained in:
gdkchan 2018-03-15 21:06:24 -03:00 committed by GitHub
parent 92f47d535e
commit 79a5939734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 567 additions and 177 deletions

View file

@ -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();
Hid = new Hid();
Statistics = new PerformanceStatistics();
Os = new Horizon(this);
VFs = new VirtualFileSystem();
Settings = new SystemSettings();
Statistics = new PerformanceStatistics();
Hid = new Hid();
Os.HidSharedMem.MemoryMapped += Hid.ShMemMap;
Os.HidSharedMem.MemoryUnmapped += Hid.ShMemUnmap;
Settings = new SetSys();
}
public void LoadCart(string ExeFsDir, string RomFsFile = null)