fix sample issues - part 5 (final?)
This commit is contained in:
parent
94cce86180
commit
35bca6e90c
12 changed files with 82 additions and 7 deletions
|
|
@ -257,6 +257,8 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
pcm=true;
|
||||
} else if (furnaceDac) {
|
||||
pcm=false;
|
||||
chan[c.chan].sampleNote=DIV_NOTE_NULL;
|
||||
chan[c.chan].sampleNoteDelta=0;
|
||||
}
|
||||
if (pcm) {
|
||||
if (skipRegisterWrites) break;
|
||||
|
|
@ -268,6 +270,9 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
chan[c.chan].sampleNote=c.value;
|
||||
c.value=ins->amiga.getFreq(c.value);
|
||||
chan[c.chan].sampleNoteDelta=c.value-chan[c.chan].sampleNote;
|
||||
} else if (chan[c.chan].sampleNote!=DIV_NOTE_NULL) {
|
||||
dacSample=ins->amiga.getSample(chan[c.chan].sampleNote);
|
||||
c.value=ins->amiga.getFreq(chan[c.chan].sampleNote);
|
||||
}
|
||||
if (dacSample<0 || dacSample>=parent->song.sampleLen) {
|
||||
dacSample=-1;
|
||||
|
|
@ -334,6 +339,8 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
dacSample=-1;
|
||||
if (dumpWrites) postWrite(0xffff0002,0);
|
||||
pcm=false;
|
||||
chan[c.chan].sampleNote=DIV_NOTE_NULL;
|
||||
chan[c.chan].sampleNoteDelta=0;
|
||||
}
|
||||
chan[c.chan].active=false;
|
||||
chan[c.chan].keyOff=true;
|
||||
|
|
@ -414,7 +421,13 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
}
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_MODE:
|
||||
if (c.chan==1) pcm=c.value;
|
||||
if (c.chan==1) {
|
||||
pcm=c.value;
|
||||
if (!pcm) {
|
||||
chan[c.chan].sampleNote=DIV_NOTE_NULL;
|
||||
chan[c.chan].sampleNoteDelta=0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_BANK:
|
||||
sampleBank=c.value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue