diff --git a/src/engine/platform/c64.cpp b/src/engine/platform/c64.cpp index 5d1eb53cc..ad1113470 100644 --- a/src/engine/platform/c64.cpp +++ b/src/engine/platform/c64.cpp @@ -68,10 +68,16 @@ void DivPlatformC64::acquire(short* bufL, short* bufR, size_t start, size_t len) for (size_t i=start; i=4) { + writeOscBuf=0; + oscBuf[0]->data[oscBuf[0]->needle++]=(sid_fp.lastChanOut[0]-dcOff)>>5; + oscBuf[1]->data[oscBuf[1]->needle++]=(sid_fp.lastChanOut[1]-dcOff)>>5; + oscBuf[2]->data[oscBuf[2]->needle++]=(sid_fp.lastChanOut[2]-dcOff)>>5; + } } else { sid.clock(); bufL[i]=sid.output(); - if (++writeOscBuf>=8) { + if (++writeOscBuf>=16) { writeOscBuf=0; oscBuf[0]->data[oscBuf[0]->needle++]=(sid.last_chan_out[0]-dcOff)>>5; oscBuf[1]->data[oscBuf[1]->needle++]=(sid.last_chan_out[1]-dcOff)>>5; diff --git a/src/engine/platform/sound/c64_fp/SID.h b/src/engine/platform/sound/c64_fp/SID.h index 05ad83c3b..85b6a4e4d 100644 --- a/src/engine/platform/sound/c64_fp/SID.h +++ b/src/engine/platform/sound/c64_fp/SID.h @@ -132,7 +132,7 @@ private: * * @return the output sample */ - int output() const; + int output(); /** * Calculate the numebr of cycles according to current parameters @@ -146,6 +146,8 @@ public: SID(); ~SID(); + int lastChanOut[3]; + /** * Set chip model. * @@ -312,12 +314,16 @@ void SID::ageBusValue(unsigned int n) } RESID_INLINE -int SID::output() const +int SID::output() { const int v1 = voice[0]->output(voice[2]->wave()); const int v2 = voice[1]->output(voice[0]->wave()); const int v3 = voice[2]->output(voice[1]->wave()); + lastChanOut[0]=v1; + lastChanOut[1]=v2; + lastChanOut[2]=v3; + return externalFilter->clock(filter->clock(v1, v2, v3)); }