Browse Source

Fix trim when importing WAV

(cherry picked from commit ff127ba57e81a9c4679b2cb036b20e37d0954e0b)
Ninni Pipping 2 năm trước cách đây
mục cha
commit
c683fa9971
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      editor/import/resource_importer_wav.cpp

+ 1 - 1
editor/import/resource_importer_wav.cpp

@@ -386,7 +386,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
 
 	bool trim = p_options["edit/trim"];
 
-	if (trim && (loop_mode != AudioStreamWAV::LOOP_DISABLED) && format_channels > 0) {
+	if (trim && (loop_mode == AudioStreamWAV::LOOP_DISABLED) && format_channels > 0) {
 		int first = 0;
 		int last = (frames / format_channels) - 1;
 		bool found = false;