fix 8-bit samples not loading correctly
This commit is contained in:
parent
35e459d9e5
commit
bd96bf484b
|
@ -1818,7 +1818,7 @@ bool DivEngine::addSampleFromFile(const char* path) {
|
|||
}
|
||||
averaged/=si.channels;
|
||||
if (((si.format&SF_FORMAT_SUBMASK)==SF_FORMAT_PCM_U8)) {
|
||||
sample->data8[index++]=averaged;
|
||||
sample->data8[index++]=averaged>>8;
|
||||
} else {
|
||||
sample->data16[index++]=averaged;
|
||||
}
|
||||
|
|
|
@ -1141,7 +1141,6 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
|
|||
} else {
|
||||
samp_temp=s->data16[sPreview.pos++];
|
||||
}
|
||||
if (s->depth==8) samp_temp<<=8;
|
||||
blip_add_delta(samp_bb,i,samp_temp-samp_prevSample);
|
||||
samp_prevSample=samp_temp;
|
||||
|
||||
|
|
Loading…
Reference in New Issue