diff --git a/src/engine/macroInt.cpp b/src/engine/macroInt.cpp index 103d9ee6..e06f61b5 100644 --- a/src/engine/macroInt.cpp +++ b/src/engine/macroInt.cpp @@ -20,6 +20,7 @@ #include "macroInt.h" #include "instrument.h" #include "engine.h" +#include "../ta-log.h" #define ADSR_LOW source.val[0] #define ADSR_HIGH source.val[1] @@ -52,6 +53,7 @@ void DivMacroStruct::doMacro(DivInstrumentMacro& source, bool released, bool tic } if (masked) { had=false; + has=false; return; } if (delay>0) { @@ -246,8 +248,10 @@ void DivMacroInt::setEngine(DivEngine* eng) { } #define ADD_MACRO(m,s) \ - macroList[macroListLen]=&m; \ - macroSource[macroListLen++]=&s; + if (!m.masked) { \ + macroList[macroListLen]=&m; \ + macroSource[macroListLen++]=&s; \ + } void DivMacroInt::init(DivInstrument* which) { ins=which; diff --git a/src/engine/platform/vic20.cpp b/src/engine/platform/vic20.cpp index 5a58f97f..5188eb15 100644 --- a/src/engine/platform/vic20.cpp +++ b/src/engine/platform/vic20.cpp @@ -75,15 +75,13 @@ void DivPlatformVIC20::acquire(short** buf, size_t len) { } void DivPlatformVIC20::calcAndWriteOutVol(int ch, int env) { + logV("calcAndWriteOutVol (%d, %d)",ch,env); chan[ch].outVol=MIN(chan[ch].vol*env/15,15); writeOutVol(ch); } void DivPlatformVIC20::writeOutVol(int ch) { - if (chan[ch].active) { - logV("writeOutVol (%d): %d",ch,chan[ch].outVol); - rWrite(14,chan[ch].outVol); - } + rWrite(14,chan[ch].outVol); } void DivPlatformVIC20::tick(bool sysTick) {