fix .dmf loading..... again (I think)
This commit is contained in:
parent
8375256ff7
commit
9e615bb3aa
|
@ -902,13 +902,14 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
|||
}
|
||||
#endif
|
||||
|
||||
int scaledLen=(double)length/samplePitches[pitch];
|
||||
int scaledLen=ceil((double)length/samplePitches[pitch]);
|
||||
|
||||
if (scaledLen>0) {
|
||||
// resample
|
||||
logD("%d: scaling from %d...",i,pitch);
|
||||
|
||||
short* newData=new short[scaledLen];
|
||||
memset(newData,0,scaledLen*sizeof(short));
|
||||
int k=0;
|
||||
float mult=(float)(vol)/50.0f;
|
||||
for (double j=0; j<length; j+=samplePitches[pitch]) {
|
||||
|
|
Loading…
Reference in New Issue