From ac524eee1b718d1fd4b3d0af466fbe447424a456 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 8 Nov 2015 12:22:12 -0800 Subject: [PATCH] Atrac: Also read loop count from context RAM. Observed the Sol Trigger demo's library writing values here, although in the cases I saw it wasn't changing it from 0. --- Core/HLE/sceAtrac.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/HLE/sceAtrac.cpp b/Core/HLE/sceAtrac.cpp index c3cd623361..08b822e42e 100644 --- a/Core/HLE/sceAtrac.cpp +++ b/Core/HLE/sceAtrac.cpp @@ -562,6 +562,7 @@ static Atrac *getAtrac(int atracID) { // Read in any changes from the game to the context. // TODO: Might be better to just always track in RAM. atrac->bufferState = atrac->atracContext->info.state; + atrac->loopNum = atrac->atracContext->info.loopNum; } return atrac; @@ -1858,6 +1859,9 @@ static u32 sceAtracSetLoopNum(int atracID, int loopNum) { atrac->loopStartSample = atrac->firstSampleoffset + atrac->firstOffsetExtra(); atrac->loopEndSample = atrac->endSample + atrac->firstSampleoffset + atrac->firstOffsetExtra(); } + if (atrac->atracContext.IsValid()) { + _AtracGenerateContext(atrac, atrac->atracContext); + } } return 0; }