new chan osc, part 8
fix remaining bugs
This commit is contained in:
parent
49a8693dcb
commit
6813c30e3a
|
@ -92,7 +92,7 @@ void DivPlatformMSM6258::acquire(short** buf, size_t len) {
|
|||
} else {
|
||||
buf[0][h]=(msmPan&2)?0:msmOut;
|
||||
buf[1][h]=(msmPan&1)?0:msmOut;
|
||||
oscBuf[0]->putSample(h,msmPan?(msmOut>>1):0);
|
||||
oscBuf[0]->putSample(h,(msmPan!=3)?(msmOut>>1):0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ void DivPlatformTX81Z::acquire(short** buf, size_t len) {
|
|||
}
|
||||
|
||||
for (int i=0; i<8; i++) {
|
||||
oscBuf[i]->begin(len);
|
||||
oscBuf[i]->end(len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void DivPlatformVERA::acquire(short** buf, size_t len) {
|
|||
// argument right into both could cause an overflow
|
||||
short whyCallItBuf[4][128];
|
||||
size_t pos=0;
|
||||
size_t lenCopy=0;
|
||||
size_t lenCopy=len;
|
||||
DivSample* s=parent->getSample(chan[16].pcm.sample);
|
||||
while (lenCopy>0) {
|
||||
if (s->samples>0 && chan[16].pcm.pos<s->samples) {
|
||||
|
|
|
@ -643,7 +643,6 @@ void FurnaceGUI::drawChanOsc() {
|
|||
|
||||
float minLevel=1.0f;
|
||||
float maxLevel=-1.0f;
|
||||
float dcOff=0.0f;
|
||||
|
||||
if (debugFFT) {
|
||||
// FFT debug code!
|
||||
|
@ -717,7 +716,8 @@ void FurnaceGUI::drawChanOsc() {
|
|||
if (maxLevel<y) maxLevel=y;
|
||||
}
|
||||
if (j<0) continue;
|
||||
float yOut=y-dcOff;
|
||||
float yOut=y-fft->dcOff;
|
||||
fft->dcOff+=(y-fft->dcOff)*0.001;
|
||||
if (yOut<-0.5f) yOut=-0.5f;
|
||||
if (yOut>0.5f) yOut=0.5f;
|
||||
yOut*=chanOscAmplify*2.0f;
|
||||
|
@ -737,14 +737,15 @@ void FurnaceGUI::drawChanOsc() {
|
|||
if (maxLevel<y) maxLevel=y;
|
||||
}
|
||||
if (kTex<0) continue;
|
||||
float yOut=y-dcOff;
|
||||
float yOut=y-fft->dcOff;
|
||||
fft->dcOff+=(y-fft->dcOff)*0.001;
|
||||
if (yOut<-0.5f) yOut=-0.5f;
|
||||
if (yOut>0.5f) yOut=0.5f;
|
||||
yOut*=chanOscAmplify*2.0f;
|
||||
fft->oscTex[kTex]=yOut;
|
||||
}
|
||||
}
|
||||
dcOff=(minLevel+maxLevel)*0.5f;
|
||||
//dcOff=(minLevel+maxLevel)*0.5f;
|
||||
|
||||
if (!(rend->supportsDrawOsc() && settings.shaderOsc)) {
|
||||
for (unsigned short j=0; j<precision; j++) {
|
||||
|
|
|
@ -2636,7 +2636,7 @@ class FurnaceGUI {
|
|||
double inBufPosFrac;
|
||||
double waveLen;
|
||||
int waveLenBottom, waveLenTop, relatedCh;
|
||||
float pitch, windowSize, phaseOff, debugPhase;
|
||||
float pitch, windowSize, phaseOff, debugPhase, dcOff;
|
||||
unsigned short needle;
|
||||
bool ready, loudEnough, waveCorr;
|
||||
fftw_plan plan;
|
||||
|
@ -2658,6 +2658,7 @@ class FurnaceGUI {
|
|||
windowSize(1.0f),
|
||||
phaseOff(0.0f),
|
||||
debugPhase(0.0f),
|
||||
dcOff(0.0f),
|
||||
needle(0),
|
||||
ready(false),
|
||||
loudEnough(false),
|
||||
|
|
Loading…
Reference in a new issue