소스 검색

Removed extra division by format channels causing sounds to get halved.

(cherry picked from commit e630591aeafd164d9cb83508462ff2fac55aa6d5)
Theis Egeberg 6 년 전
부모
커밋
a2cf479f07
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      editor/import/resource_importer_wav.cpp

+ 2 - 2
editor/import/resource_importer_wav.cpp

@@ -409,12 +409,12 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
 			float amp = Math::abs(ampChannelSum / (float)format_channels);
 
 			if (!found && amp > limit) {
-				first = i / format_channels;
+				first = i;
 				found = true;
 			}
 
 			if (found && amp > limit) {
-				last = i / format_channels;
+				last = i;
 			}
 		}