add sample depth restriction
This commit is contained in:
parent
4158b4fd55
commit
cd64a821a0
1 changed files with 6 additions and 0 deletions
|
|
@ -1799,7 +1799,13 @@ void FurnaceGUI::doAction(int what) {
|
|||
case GUI_ACTION_SAMPLE_COPY_NEW: {
|
||||
if (curSample<0 || curSample>=(int)e->song.sample.size()) break;
|
||||
int prevSampleNum=curSample;
|
||||
|
||||
DivSample* sample=e->song.sample[curSample];
|
||||
if (sample->depth!=DIV_SAMPLE_DEPTH_16BIT && sample->depth!=DIV_SAMPLE_DEPTH_8BIT) {
|
||||
showError(_("sample depth must be 16 or 8 bit!"));
|
||||
break;
|
||||
}
|
||||
|
||||
SAMPLE_OP_BEGIN;
|
||||
if (end-start<1) {
|
||||
showError(_("select at least one sample!"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue