SNES: loop injection

This commit is contained in:
tildearrow 2022-10-04 01:20:26 -05:00
parent d981e59c59
commit c2b75d26d7

View file

@ -783,6 +783,10 @@ void DivPlatformSNES::renderSamples() {
if (actualLength>0) { if (actualLength>0) {
sampleOff[i]=memPos; sampleOff[i]=memPos;
memcpy(&copyOfSampleMem[memPos],s->dataBRR,actualLength); memcpy(&copyOfSampleMem[memPos],s->dataBRR,actualLength);
// inject loop if needed
if (s->loop) {
copyOfSampleMem[memPos+actualLength-9]|=3;
}
memPos+=actualLength; memPos+=actualLength;
} }
if (actualLength<length) { if (actualLength<length) {