.mod import

This commit is contained in:
Natt Akuma 2022-03-14 21:50:52 +07:00
parent 372f2a20a2
commit 87f225074c
10 changed files with 432 additions and 10 deletions

View file

@ -184,7 +184,11 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
if (chan[c.chan].sample<0 || chan[c.chan].sample>=parent->song.sampleLen) {
chan[c.chan].sample=-1;
}
chan[c.chan].audPos=0;
if (chan[c.chan].setPos) {
chan[c.chan].setPos=false;
} else {
chan[c.chan].audPos=0;
}
chan[c.chan].audSub=0;
if (c.value!=DIV_NOTE_NULL) {
chan[c.chan].freqChanged=true;
@ -276,6 +280,10 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
}
chan[c.chan].inPorta=c.value;
break;
case DIV_CMD_SAMPLE_POS:
chan[c.chan].audPos=c.value;
chan[c.chan].setPos=true;
break;
case DIV_CMD_GET_VOLMAX:
return 64;
break;

View file

@ -36,7 +36,7 @@ class DivPlatformAmiga: public DivDispatch {
unsigned char ins;
int busClock;
int note;
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, useWave;
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, useWave, setPos;
signed char vol, outVol;
DivMacroInt std;
Channel():
@ -60,6 +60,7 @@ class DivPlatformAmiga: public DivDispatch {
keyOff(false),
inPorta(false),
useWave(false),
setPos(false),
vol(64),
outVol(64) {}
};