diff --git a/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs b/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs index 8ce86a0bcf..1eb61d29f5 100644 --- a/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs +++ b/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs @@ -45,7 +45,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud foreach (string Name in DeviceNames) { - byte[] Buffer = Encoding.UTF8.GetBytes(Name + '\0'); + byte[] Buffer = Encoding.ASCII.GetBytes(Name + "\0"); if ((Position - BasePosition) + Buffer.Length > Size) { @@ -71,7 +71,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud byte[] DeviceNameBuffer = AMemoryHelper.ReadBytes(Context.Memory, Position, Size); - string DeviceName = Encoding.UTF8.GetString(DeviceNameBuffer); + string DeviceName = Encoding.ASCII.GetString(DeviceNameBuffer); Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed."); @@ -85,7 +85,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud long Position = Context.Request.ReceiveBuff[0].Position; long Size = Context.Request.ReceiveBuff[0].Size; - byte[] DeviceNameBuffer = Encoding.UTF8.GetBytes(Name + '\0'); + byte[] DeviceNameBuffer = Encoding.ASCII.GetBytes(Name + "\0"); if ((ulong)DeviceNameBuffer.Length <= (ulong)Size) { diff --git a/Ryujinx.Core/OsHle/Services/Aud/IAudioOutManager.cs b/Ryujinx.Core/OsHle/Services/Aud/IAudioOutManager.cs index 3bf154f362..d9484a9585 100644 --- a/Ryujinx.Core/OsHle/Services/Aud/IAudioOutManager.cs +++ b/Ryujinx.Core/OsHle/Services/Aud/IAudioOutManager.cs @@ -32,7 +32,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud int NameCount = 0; - byte[] DeviceNameBuffer = Encoding.UTF8.GetBytes(DefaultAudioOutput); + byte[] DeviceNameBuffer = Encoding.ASCII.GetBytes(DefaultAudioOutput + "\0"); if ((ulong)DeviceNameBuffer.Length <= (ulong)Size) { @@ -67,7 +67,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud long Position = Context.Request.ReceiveBuff[0].Position; long Size = Context.Request.ReceiveBuff[0].Size; - byte[] DeviceNameBuffer = Encoding.UTF8.GetBytes(DeviceName); + byte[] DeviceNameBuffer = Encoding.ASCII.GetBytes(DeviceName + "\0"); if ((ulong)DeviceNameBuffer.Length <= (ulong)Size) {