SNES: fix BRR once again

This commit is contained in:
tildearrow 2023-05-24 02:38:43 -05:00
parent 4b12f440fa
commit 0fd5483b59
1 changed files with 3 additions and 2 deletions

View File

@ -1130,8 +1130,9 @@ void DivSample::render(unsigned int formatMask) {
}
}
if (NOT_IN_FORMAT(DIV_SAMPLE_DEPTH_BRR)) { // BRR
if (!initInternal(DIV_SAMPLE_DEPTH_BRR,samples)) return;
brrEncode(data16,dataBRR,samples,loop?loopStart:-1,brrEmphasis);
int sampleCount=loop?loopEnd:samples;
if (!initInternal(DIV_SAMPLE_DEPTH_BRR,sampleCount)) return;
brrEncode(data16,dataBRR,sampleCount,loop?loopStart:-1,brrEmphasis);
}
if (NOT_IN_FORMAT(DIV_SAMPLE_DEPTH_VOX)) { // VOX
if (!initInternal(DIV_SAMPLE_DEPTH_VOX,samples)) return;