From 41d0abc83e3615f88343258d1c24981bd9d7d9cf Mon Sep 17 00:00:00 2001 From: Ninni Pipping Date: Thu, 23 Mar 2023 16:53:55 +0100 Subject: [PATCH] Fix trim when importing WAV --- editor/import/resource_importer_wav.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index df1af3554..36b9a1870 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -404,7 +404,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s bool trim = p_options["edit/trim"]; - if (trim && (loop_mode != AudioStreamSample::LOOP_DISABLED) && format_channels > 0) { + if (trim && (loop_mode == AudioStreamSample::LOOP_DISABLED) && format_channels > 0) { int first = 0; int last = (frames / format_channels) - 1; bool found = false;