Add notifySampleChanged in dispatch and engine:
This method/variables are for notify sample is changed/altered/added/removed. can be called together with updateSampleTex for sample update. multipcm: Fix possible desync with instrument and sample parameter opl4: Split sample table render and sample data render, Add notifySampleChange for refresh sample parameters
This commit is contained in:
parent
7253bf66cd
commit
1b712e03ee
15 changed files with 146 additions and 52 deletions
|
|
@ -946,6 +946,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
MARK_MODIFIED;
|
||||
}
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
}
|
||||
break;
|
||||
case GUI_ACTION_WAVE_LIST_MOVE_UP:
|
||||
|
|
@ -1003,6 +1004,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
MARK_MODIFIED;
|
||||
}
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_DUPLICATE:
|
||||
if (curSample>=0 && curSample<(int)e->song.sample.size()) {
|
||||
|
|
@ -1037,6 +1039,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
MARK_MODIFIED;
|
||||
}
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
}
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_OPEN:
|
||||
|
|
@ -1062,6 +1065,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
curSample--;
|
||||
wantScrollListSample=true;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1070,6 +1074,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
curSample++;
|
||||
wantScrollListSample=true;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1081,6 +1086,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
curSample--;
|
||||
}
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_EDIT:
|
||||
sampleEditOpen=true;
|
||||
|
|
@ -1089,11 +1095,13 @@ void FurnaceGUI::doAction(int what) {
|
|||
if (--curSample<0) curSample=0;
|
||||
wantScrollListSample=true;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_DOWN:
|
||||
if (++curSample>=(int)e->song.sample.size()) curSample=((int)e->song.sample.size())-1;
|
||||
wantScrollListSample=true;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_PREVIEW:
|
||||
e->previewSample(curSample);
|
||||
|
|
@ -1183,6 +1191,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
e->lockEngine([this,sample,start,end]() {
|
||||
sample->strip(start,end);
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1235,6 +1244,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
sampleSelStart=pos;
|
||||
sampleSelEnd=pos+sampleClipboardLen;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
MARK_MODIFIED;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1266,6 +1276,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
sampleSelEnd=pos+sampleClipboardLen;
|
||||
if (sampleSelEnd>(int)sample->samples) sampleSelEnd=sample->samples;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
MARK_MODIFIED;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1303,6 +1314,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
sampleSelEnd=pos+sampleClipboardLen;
|
||||
if (sampleSelEnd>(int)sample->samples) sampleSelEnd=sample->samples;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
MARK_MODIFIED;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1368,6 +1380,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1399,6 +1412,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1430,6 +1444,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1459,6 +1474,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1475,6 +1491,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
|
||||
sample->strip(start,end);
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1493,6 +1510,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
|
||||
sample->trim(start,end);
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1528,6 +1546,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1555,6 +1574,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1580,6 +1600,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
@ -1713,6 +1734,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
sample->loopEnd=end;
|
||||
sample->loop=true;
|
||||
updateSampleTex=true;
|
||||
notifySampleChange=true;
|
||||
|
||||
e->renderSamples(curSample);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue