IT import: prepare load compressed stereo samples

This commit is contained in:
tildearrow 2024-07-08 18:57:56 -05:00
parent bbdc215ed5
commit f204c11204
2 changed files with 12 additions and 9 deletions

View file

@ -1,8 +1,3 @@
# to-do for 0.6.6
- fix possible issues when moving selection
- fix Metal intro crash
# to-do long term
- CSM macros
@ -10,3 +5,5 @@
- new pattern renderer - performance improvements
- new info header
- unlimited channels and chips
- fix possible issues when moving selection
- fix Metal intro crash

View file

@ -641,12 +641,18 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
if (flags&8) { // compressed sample
unsigned int ret=0;
logV("decompression begin...");
logV("decompression begin... (%d)",s->samples);
if (flags&4) {
logW("STEREO!");
} else {
if (s->depth==DIV_SAMPLE_DEPTH_16BIT) {
logV("16-bit");
ret=it_decompress16(s->data16,s->samples,&file[reader.tell()],len-reader.tell(),(convert&4)?1:0,(flags&4)?2:1);
} else {
logV("8-bit");
ret=it_decompress8(s->data8,s->samples,&file[reader.tell()],len-reader.tell(),(convert&4)?1:0,(flags&4)?2:1);
}
}
logV("got: %d",ret);
} else {
if (s->depth==DIV_SAMPLE_DEPTH_16BIT) {