Răsfoiți Sursa

Merge pull request #27927 from theisegeberg/#27925_trimHalvesAudio

Fixes WAV import being cut in half with new trim code
Rémi Verschelde 6 ani în urmă
părinte
comite
ceebd748b9
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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;
 			}
 		}