소스 검색

Fix trim when importing WAV

(cherry picked from commit ff127ba57e81a9c4679b2cb036b20e37d0954e0b)
Ninni Pipping 2 년 전
부모
커밋
c683fa9971
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;