mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
fix .dmf loading..... again (I think)
This commit is contained in:
parent
8375256ff7
commit
9e615bb3aa
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue