copy nibble and revert pps init length
pps sample length may be in bytes
This commit is contained in:
parent
c9f3e95add
commit
b6c49712d7
|
@ -93,7 +93,7 @@ void DivEngine::loadPPS(SafeReader& reader, std::vector<DivSample*>& ret, String
|
||||||
s->rate = PPS_SAMPLE_RATE;
|
s->rate = PPS_SAMPLE_RATE;
|
||||||
s->centerRate = PPS_SAMPLE_RATE;
|
s->centerRate = PPS_SAMPLE_RATE;
|
||||||
s->depth = DIV_SAMPLE_DEPTH_4BIT;
|
s->depth = DIV_SAMPLE_DEPTH_4BIT;
|
||||||
s->init(headers[i].sample_length);
|
s->init(headers[i].sample_length*2); // bytes->samples
|
||||||
|
|
||||||
reader.seek((int)headers[i].start_pointer, SEEK_SET);
|
reader.seek((int)headers[i].start_pointer, SEEK_SET);
|
||||||
|
|
||||||
|
|
|
@ -1343,7 +1343,7 @@ void DivSample::render(unsigned int formatMask) {
|
||||||
} else {
|
} else {
|
||||||
nibble=data4[i>>1]>>4;
|
nibble=data4[i>>1]>>4;
|
||||||
}
|
}
|
||||||
data16[i]=(nibble<<12)^0x8000;
|
data16[i]=((nibble<<12)|(nibble<<8)|(nibble<<4)|nibble)^0x8000;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue