aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Aud
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-10-17 14:15:50 -0300
committergdkchan <gab.dark.100@gmail.com>2018-10-17 14:15:50 -0300
commitb3a4662be15bd63d5b70cf4be21d79959e11ccfc (patch)
treedaca12b81aafcae1651e89c434f2e7cfd8a85132 /Ryujinx.HLE/HOS/Services/Aud
parent9b19ea3c87518234fd72a6dead727eb5d8379c0d (diff)
Move logging to Ryujinx.Common and make it a static class (#413)
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Aud')
-rw-r--r--Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs8
-rw-r--r--Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs24
-rw-r--r--Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs10
-rw-r--r--Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs8
4 files changed, 25 insertions, 25 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs
index 13225951..7963cbb4 100644
--- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs
+++ b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs
@@ -1,9 +1,9 @@
using ChocolArm64.Memory;
using Ryujinx.Audio;
using Ryujinx.Audio.Adpcm;
+using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.Kernel;
-using Ryujinx.HLE.Logging;
using Ryujinx.HLE.Utilities;
using System;
using System.Collections.Generic;
@@ -107,7 +107,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
{
Context.ResponseData.Write((int)PlayState);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, $"Stubbed. Renderer State: {Enum.GetName(typeof(PlayState), PlayState)}");
+ Logger.PrintStub(LogClass.ServiceAudio, $"Stubbed. Renderer State: {Enum.GetName(typeof(PlayState), PlayState)}");
return 0;
}
@@ -246,7 +246,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
public long StartAudioRenderer(ServiceCtx Context)
{
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
PlayState = PlayState.Playing;
@@ -255,7 +255,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
public long StopAudioRenderer(ServiceCtx Context)
{
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
PlayState = PlayState.Stopped;
diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs b/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs
index a1a228ed..f9c0d315 100644
--- a/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs
+++ b/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs
@@ -1,7 +1,7 @@
+using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.Kernel;
using Ryujinx.HLE.HOS.SystemState;
-using Ryujinx.HLE.Logging;
using System;
using System.Collections.Generic;
using System.Text;
@@ -56,7 +56,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
if ((Position - BasePosition) + Buffer.Length > Size)
{
- Context.Device.Log.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
+ Logger.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
break;
}
@@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
string DeviceName = Encoding.ASCII.GetString(DeviceNameBuffer);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
return 0;
}
@@ -100,7 +100,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
}
else
{
- Context.Device.Log.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
+ Logger.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
}
return 0;
@@ -115,7 +115,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
return 0;
}
@@ -124,7 +124,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
{
Context.ResponseData.Write(2);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
return 0;
}
@@ -145,7 +145,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
if ((Position - BasePosition) + Buffer.Length > Size)
{
- Context.Device.Log.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
+ Logger.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
break;
}
@@ -168,7 +168,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
string DeviceName = Encoding.UTF8.GetString(DeviceNameBuffer);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
return 0;
}
@@ -177,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
{
Context.ResponseData.Write(1f);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
return 0;
}
@@ -196,7 +196,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
}
else
{
- Context.Device.Log.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
+ Logger.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
}
return 0;
@@ -211,7 +211,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
return 0;
}
@@ -225,7 +225,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
+ Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
return 0;
}
diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs b/Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs
index 44b856cd..2bc2d820 100644
--- a/Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs
+++ b/Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs
@@ -1,9 +1,9 @@
using ChocolArm64.Memory;
using Ryujinx.Audio;
+using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.Kernel;
using Ryujinx.HLE.HOS.Services.Aud.AudioOut;
-using Ryujinx.HLE.Logging;
using System.Collections.Generic;
using System.Text;
@@ -86,7 +86,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
}
else
{
- Context.Device.Log.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
+ Logger.PrintError(LogClass.ServiceAudio, $"Output buffer size {Size} too small!");
}
Context.ResponseData.Write(NameCount);
@@ -108,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
if (DeviceName != DefaultAudioOutput)
{
- Context.Device.Log.PrintWarning(LogClass.Audio, "Invalid device name!");
+ Logger.PrintWarning(LogClass.Audio, "Invalid device name!");
return MakeError(ErrorModule.Audio, AudErr.DeviceNotFound);
}
@@ -121,7 +121,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
}
else
{
- Context.Device.Log.PrintError(LogClass.ServiceAudio, $"Output buffer size {ReceiveSize} too small!");
+ Logger.PrintError(LogClass.ServiceAudio, $"Output buffer size {ReceiveSize} too small!");
}
int SampleRate = Context.RequestData.ReadInt32();
@@ -134,7 +134,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
if (SampleRate != DefaultSampleRate)
{
- Context.Device.Log.PrintWarning(LogClass.Audio, "Invalid sample rate!");
+ Logger.PrintWarning(LogClass.Audio, "Invalid sample rate!");
return MakeError(ErrorModule.Audio, AudErr.UnsupportedSampleRate);
}
diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs b/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs
index 7859e013..49bbbd5a 100644
--- a/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs
+++ b/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs
@@ -1,7 +1,7 @@
using Ryujinx.Audio;
+using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.Services.Aud.AudioRenderer;
-using Ryujinx.HLE.Logging;
using Ryujinx.HLE.Utilities;
using System;
using System.Collections.Generic;
@@ -104,7 +104,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
Context.ResponseData.Write(Size);
- Context.Device.Log.PrintDebug(LogClass.ServiceAudio, $"WorkBufferSize is 0x{Size:x16}.");
+ Logger.PrintDebug(LogClass.ServiceAudio, $"WorkBufferSize is 0x{Size:x16}.");
return 0;
}
@@ -112,7 +112,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
{
Context.ResponseData.Write(0L);
- Context.Device.Log.PrintWarning(LogClass.ServiceAudio, $"Library Revision 0x{Params.Revision:x8} is not supported!");
+ Logger.PrintWarning(LogClass.ServiceAudio, $"Library Revision 0x{Params.Revision:x8} is not supported!");
return MakeError(ErrorModule.Audio, AudErr.UnsupportedRevision);
}
@@ -179,7 +179,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
long AppletResourceUserId = Context.RequestData.ReadInt64();
int RevisionInfo = Context.RequestData.ReadInt32();
- Context.Device.Log.PrintStub(LogClass.ServiceAudio, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
+ Logger.PrintStub(LogClass.ServiceAudio, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
$"RevisionInfo: {RevisionInfo}");
return GetAudioDeviceService(Context);