fix retrigger issue in sample instruments

This commit is contained in:
tildearrow 2022-04-15 01:26:44 -05:00
parent 397ab43ffd
commit a530934671
3 changed files with 9 additions and 5 deletions

View File

@ -493,8 +493,10 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
}
dacPos=0;
dacPeriod=0;
chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value);
chan[c.chan].freqChanged=true;
if (c.value!=DIV_NOTE_NULL) {
chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value);
chan[c.chan].freqChanged=true;
}
chan[c.chan].furnaceDac=true;
} else { // compatible mode
if (c.value!=DIV_NOTE_NULL) {

View File

@ -274,8 +274,8 @@ int DivPlatformNES::dispatch(DivCommand c) {
}
dacPos=0;
dacPeriod=0;
chan[c.chan].baseFreq=parent->song.tuning*pow(2.0f,((float)(c.value+3)/12.0f));
if (c.value!=DIV_NOTE_NULL) {
chan[c.chan].baseFreq=parent->song.tuning*pow(2.0f,((float)(c.value+3)/12.0f));
chan[c.chan].freqChanged=true;
chan[c.chan].note=c.value;
}

View File

@ -142,8 +142,10 @@ int DivPlatformSegaPCM::dispatch(DivCommand c) {
break;
}
chan[c.chan].pcm.pos=0;
chan[c.chan].baseFreq=(c.value<<6);
chan[c.chan].freqChanged=true;
if (c.value!=DIV_NOTE_NULL) {
chan[c.chan].baseFreq=(c.value<<6);
chan[c.chan].freqChanged=true;
}
chan[c.chan].furnacePCM=true;
if (dumpWrites) { // Sega PCM writes
DivSample* s=parent->getSample(chan[c.chan].pcm.sample);