mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-02 14:16:53 +00:00
Fix VAG looping.
This commit is contained in:
parent
91bdc0617e
commit
7b154f9a2e
@ -76,7 +76,7 @@ u32 sceSasInit(u32 core, u32 grainSize, u32 maxVoices, u32 outputMode, u32 sampl
|
||||
for (int i = 0; i < sas->maxVoices; i++) {
|
||||
sas->voices[i].sampleRate = sampleRate;
|
||||
sas->voices[i].playing = false;
|
||||
sas->voices[i].loop = true; // inverted flag
|
||||
sas->voices[i].loop = false;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -140,7 +140,7 @@ u32 sceSasSetVoice(u32 core, int voiceNum, u32 vagAddr, int size, int loop) {
|
||||
v.type = VOICETYPE_VAG;
|
||||
v.vagAddr = vagAddr;
|
||||
v.vagSize = size;
|
||||
v.loop = loop ? false : true;
|
||||
v.loop = loop ? true : false;
|
||||
v.ChangedParams(vagAddr == prevVagAddr);
|
||||
return 0;
|
||||
}
|
||||
@ -170,7 +170,7 @@ u32 sceSasSetVoicePCM(u32 core, int voiceNum, u32 pcmAddr, int size, int loop)
|
||||
v.pcmAddr = pcmAddr;
|
||||
v.pcmSize = size;
|
||||
v.pcmIndex = 0;
|
||||
v.loop = loop ? false : true;
|
||||
v.loop = loop ? true : false;
|
||||
v.playing = true;
|
||||
v.ChangedParams(pcmAddr == prevPcmAddr);
|
||||
return 0;
|
||||
|
@ -97,10 +97,12 @@ void VagDecoder::GetSamples(s16 *outSamples, int numSamples) {
|
||||
for (int i = 0; i < numSamples; i++) {
|
||||
if (curSample == 28) {
|
||||
if (loopAtNextBlock_) {
|
||||
read_ = data_ + 16 * loopStartBlock_;
|
||||
// data_ starts at curBlock = -1.
|
||||
read_ = data_ + 16 * loopStartBlock_ + 16;
|
||||
readp = Memory::GetPointer(read_);
|
||||
origp = readp;
|
||||
curBlock_ = loopStartBlock_;
|
||||
loopAtNextBlock_ = false;
|
||||
}
|
||||
DecodeBlock(readp);
|
||||
if (end_) {
|
||||
|
Loading…
Reference in New Issue
Block a user