Merge pull request #27927 from theisegeberg/#27925_trimHalvesAudio

Fixes WAV import being cut in half with new trim code
This commit is contained in:
Rémi Verschelde 2019-04-30 10:46:56 +02:00 committed by GitHub
commit ceebd748b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}