add spaces

This commit is contained in:
tildearrow 2024-09-08 18:54:48 -05:00
parent e16bd903ef
commit 10e491cd35

View file

@ -1310,7 +1310,7 @@ void DivSample::render(unsigned int formatMask) {
if (adpcm_decode_block(data16,dataIMA,lengthIMA,samples)==0) logE("oh crap!");
break;
case DIV_SAMPLE_DEPTH_12BIT: // 12-bit PCM (MultiPCM)
for (unsigned int i=0,j=0; i<samples; i+=2,j+=3) {
for (unsigned int i=0, j=0; i<samples; i+=2, j+=3) {
data16[i+0]=(data12[j+0]<<8)|(data12[j+1]&0xf0);
if (i+1<samples) {
data16[i+1]=(data12[j+2]<<8)|((data12[j+1]<<4)&0xf0);
@ -1508,11 +1508,12 @@ void DivSample::render(unsigned int formatMask) {
}
if (NOT_IN_FORMAT(DIV_SAMPLE_DEPTH_12BIT)) { // 12-bit PCM (MultiPCM)
if (!initInternal(DIV_SAMPLE_DEPTH_12BIT,samples)) return;
for (unsigned int i=0,j=0; i<samples; i+=2,j+=3) {
for (unsigned int i=0, j=0; i<samples; i+=2, j+=3) {
data12[j+0]=data16[i+0]>>8;
data12[j+1]=((data16[i+0]>>4)&0xf)|(i+1<samples?(data16[i+1]>>4)&0xf:0);
if (i+1<samples)
if (i+1<samples) {
data12[j+2]=data16[i+1]>>8;
}
}
}
}