Merge branch 'master' of https://github.com/tildearrow/furnace
This commit is contained in:
commit
2defb12800
|
|
@ -111,10 +111,10 @@ long brrEncode(short* buf, unsigned char* out, long len, long loopStart) {
|
||||||
next+=(last1*15)/16; \
|
next+=(last1*15)/16; \
|
||||||
break; \
|
break; \
|
||||||
case 8: \
|
case 8: \
|
||||||
next+=((last1*61)/32)-((last2*15)/16); \
|
next+=((last2*61)/32)-((last1*15)/16); \
|
||||||
break; \
|
break; \
|
||||||
case 12: \
|
case 12: \
|
||||||
next+=((last1*115)/64)-((last2*13)/16); \
|
next+=((last2*115)/64)-((last1*13)/16); \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ bool DivSample::save(const char* path) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
sf_write_raw(f,data16,length16);
|
sf_writef_short(f,data16,samples);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -852,7 +852,7 @@ void DivSample::render() {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_SAMPLE_DEPTH_BRR: // BRR
|
case DIV_SAMPLE_DEPTH_BRR: // BRR
|
||||||
brrDecode(dataBRR,data16,samples);
|
brrDecode(dataBRR,data16,lengthBRR);
|
||||||
break;
|
break;
|
||||||
case DIV_SAMPLE_DEPTH_VOX: // VOX
|
case DIV_SAMPLE_DEPTH_VOX: // VOX
|
||||||
oki_decode(dataVOX,data16,samples);
|
oki_decode(dataVOX,data16,samples);
|
||||||
|
|
@ -909,7 +909,7 @@ void DivSample::render() {
|
||||||
data8[i]=data16[i]>>8;
|
data8[i]=data16[i]>>8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (depth!=DIV_SAMPLE_DEPTH_VOX) { // BRR
|
if (depth!=DIV_SAMPLE_DEPTH_BRR) { // BRR
|
||||||
if (!initInternal(DIV_SAMPLE_DEPTH_BRR,samples)) return;
|
if (!initInternal(DIV_SAMPLE_DEPTH_BRR,samples)) return;
|
||||||
// TODO: loop point
|
// TODO: loop point
|
||||||
brrEncode(data16,dataBRR,samples,0);
|
brrEncode(data16,dataBRR,samples,0);
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ SafeWriter* DivEngine::saveZSM(unsigned int zsmrate, bool loop) {
|
||||||
|
|
||||||
// Prepare to write song data
|
// Prepare to write song data
|
||||||
playSub(false);
|
playSub(false);
|
||||||
size_t tickCount=0;
|
//size_t tickCount=0;
|
||||||
bool done=false;
|
bool done=false;
|
||||||
int loopPos=-1;
|
int loopPos=-1;
|
||||||
int writeCount=0;
|
int writeCount=0;
|
||||||
|
|
@ -155,7 +155,7 @@ SafeWriter* DivEngine::saveZSM(unsigned int zsmrate, bool loop) {
|
||||||
fracWait &= MASTER_CLOCK_MASK;
|
fracWait &= MASTER_CLOCK_MASK;
|
||||||
if (totalWait>0) {
|
if (totalWait>0) {
|
||||||
zsm.tick(totalWait);
|
zsm.tick(totalWait);
|
||||||
tickCount+=totalWait;
|
//tickCount+=totalWait;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end of song
|
// end of song
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue