aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs
index 4af04ee0..c14c46b3 100644
--- a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs
+++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs
@@ -1,5 +1,5 @@
-using ARMeilleure.Memory;
using Ryujinx.Audio.Adpcm;
+using Ryujinx.Cpu;
using System;
namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager
@@ -146,7 +146,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager
{
for (int index = 0; index < samplesCount; index++)
{
- short sample = memory.ReadInt16(wb.Position + index * 2);
+ short sample = memory.Read<short>((ulong)(wb.Position + index * 2));
_samples[index * 2 + 0] = sample;
_samples[index * 2 + 1] = sample;
@@ -156,13 +156,15 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager
{
for (int index = 0; index < samplesCount * 2; index++)
{
- _samples[index] = memory.ReadInt16(wb.Position + index * 2);
+ _samples[index] = memory.Read<short>((ulong)(wb.Position + index * 2));
}
}
}
else if (SampleFormat == SampleFormat.Adpcm)
{
- byte[] buffer = memory.ReadBytes(wb.Position, wb.Size);
+ byte[] buffer = new byte[wb.Size];
+
+ memory.Read((ulong)wb.Position, buffer);
_samples = AdpcmDecoder.Decode(buffer, AdpcmCtx);
}