diff --git a/src/engine/platform/dummy.cpp b/src/engine/platform/dummy.cpp index d1e121313..fa773cb51 100644 --- a/src/engine/platform/dummy.cpp +++ b/src/engine/platform/dummy.cpp @@ -6,7 +6,8 @@ void DivPlatformDummy::acquire(int& l, int& r) { l=0; for (unsigned char i=0; i=0x8000)?chan[i].vol:-chan[i].vol)<<5; + l+=((chan[i].pos>=0x8000)?chan[i].vol:-chan[i].vol)*chan[i].amp; + chan[i].pos+=chan[i].freq; } } @@ -14,20 +15,25 @@ void DivPlatformDummy::acquire(int& l, int& r) { } void DivPlatformDummy::tick() { + for (unsigned char i=0; i15) chan[c.chan].vol=15; break; case DIV_CMD_GET_VOLUME: return chan[c.chan].vol; diff --git a/src/engine/platform/dummy.h b/src/engine/platform/dummy.h index ad6381721..595c1d8ce 100644 --- a/src/engine/platform/dummy.h +++ b/src/engine/platform/dummy.h @@ -8,7 +8,8 @@ class DivPlatformDummy: public DivDispatch { unsigned short pos; bool active; unsigned char vol; - Channel(): freq(0), pos(0), active(false), vol(0) {} + signed char amp; + Channel(): freq(0), pos(0), active(false), vol(0), amp(64) {} }; Channel chan[17]; unsigned char chans;