diff --git a/papers/format.md b/papers/format.md index a58193be0..2123d5dde 100644 --- a/papers/format.md +++ b/papers/format.md @@ -1520,6 +1520,10 @@ chips which aren't on this list don't have any flags. - 1: 16.67MHz - bit 4: stereo (bool) +## 0xb1: Ensoniq ES5506 + +- bit 0-4: channels (int) + ## 0xb5: tildearrow Sound Unit - bit 0: clockSel (int) diff --git a/src/engine/platform/es5506.cpp b/src/engine/platform/es5506.cpp index dab6f7c5d..adaebca9a 100644 --- a/src/engine/platform/es5506.cpp +++ b/src/engine/platform/es5506.cpp @@ -141,8 +141,8 @@ void DivPlatformES5506::acquire(short* bufL, short* bufR, size_t start, size_t l } void DivPlatformES5506::e_pin(bool state) { - if (es5506.e_falling_edge()) { - if (es5506.voice_update()) { // get channel outputs + if (es5506.e_falling_edge()) { // get channel outputs + if (es5506.voice_update()) { chan[prevChanCycle].lOut=es5506.voice_lout(prevChanCycle); chan[prevChanCycle].rOut=es5506.voice_rout(prevChanCycle); chan[prevChanCycle].oscOut=CLAMP((chan[prevChanCycle].lOut+chan[prevChanCycle].rOut)>>5,-32768,32767); @@ -155,8 +155,7 @@ void DivPlatformES5506::e_pin(bool state) { } } } - // host interface - if (es5506.e_rising_edge()) { + if (es5506.e_rising_edge()) { // host interface if (cycle) { // wait until delay cycle--; } else if (!hostIntf8.empty()) {