aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-10-20 19:07:52 -0300
committerAc_K <Acoustik666@gmail.com>2018-10-20 22:07:52 +0000
commit2cb8541462e3cc31e9a4ffe63f430168c0c747d1 (patch)
treefa334b97c96e4541cf3bd6bc0913c70d57c4370d /Ryujinx.HLE/HOS/Services
parent0e1e094b7a8f0134831fc4cebdb0841b9c10fe6a (diff)
Print stack trace on invalid memory accesses (#461)
* Print stack trace on invalid memory accesses * Rebased, change code region base address for 39-bits address space, print stack trace on break and undefined instructions too
Diffstat (limited to 'Ryujinx.HLE/HOS/Services')
-rw-r--r--Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs
index bee574ff..044b2efc 100644
--- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs
+++ b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs
@@ -125,6 +125,13 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
//As of now, it assumes that HostChannelsCount == 2.
WaveBuffer Wb = WaveBuffers[BufferIndex];
+ if (Wb.Position == 0)
+ {
+ Samples = new int[0];
+
+ return;
+ }
+
if (SampleFormat == SampleFormat.PcmInt16)
{
int SamplesCount = (int)(Wb.Size / (sizeof(short) * ChannelsCount));