From cd64a821a0d3a5fb6271ac7c13ea4de693b8aaff Mon Sep 17 00:00:00 2001 From: yohannd1 Date: Tue, 20 Jan 2026 18:26:01 -0300 Subject: [PATCH] add sample depth restriction --- src/gui/doAction.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/doAction.cpp b/src/gui/doAction.cpp index 0f58c0a69..3c0d9f6e1 100644 --- a/src/gui/doAction.cpp +++ b/src/gui/doAction.cpp @@ -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!"));