mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 17:45:10 +00:00
Fix sample map issue in ES5506
This commit is contained in:
parent
ed548c98c4
commit
60e3768a66
1 changed files with 3 additions and 5 deletions
|
@ -754,15 +754,13 @@ int DivPlatformES5506::dispatch(DivCommand c) {
|
||||||
if (((ins->amiga.useNoteMap) && (c.value>=0 && c.value<120)) ||
|
if (((ins->amiga.useNoteMap) && (c.value>=0 && c.value<120)) ||
|
||||||
((!ins->amiga.useNoteMap) && (ins->amiga.initSample>=0 && ins->amiga.initSample<parent->song.sampleLen))) {
|
((!ins->amiga.useNoteMap) && (ins->amiga.initSample>=0 && ins->amiga.initSample<parent->song.sampleLen))) {
|
||||||
DivInstrumentAmiga::SampleMap& noteMapind=ins->amiga.noteMap[c.value];
|
DivInstrumentAmiga::SampleMap& noteMapind=ins->amiga.noteMap[c.value];
|
||||||
int sample=ins->amiga.initSample;
|
int sample=ins->amiga.getSample(c.value);
|
||||||
if (ins->amiga.useNoteMap) {
|
|
||||||
sample=noteMapind.map;
|
|
||||||
}
|
|
||||||
if (sample>=0 && sample<parent->song.sampleLen) {
|
if (sample>=0 && sample<parent->song.sampleLen) {
|
||||||
sampleVaild=true;
|
sampleVaild=true;
|
||||||
chan[c.chan].volMacroMax=ins->type==DIV_INS_AMIGA?64:0xfff;
|
chan[c.chan].volMacroMax=ins->type==DIV_INS_AMIGA?64:0xfff;
|
||||||
chan[c.chan].panMacroMax=ins->type==DIV_INS_AMIGA?127:0xfff;
|
chan[c.chan].panMacroMax=ins->type==DIV_INS_AMIGA?127:0xfff;
|
||||||
chan[c.chan].pcm.next=sample;
|
chan[c.chan].pcm.note=c.value;
|
||||||
|
chan[c.chan].pcm.next=ins->amiga.useNoteMap?c.value:sample;
|
||||||
chan[c.chan].filter=ins->es5506.filter;
|
chan[c.chan].filter=ins->es5506.filter;
|
||||||
chan[c.chan].envelope=ins->es5506.envelope;
|
chan[c.chan].envelope=ins->es5506.envelope;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue