diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-30 10:46:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 10:46:56 +0200 |
commit | ceebd748b94a3ba5d294b24a863a9e9c70a1b721 (patch) | |
tree | 7211130d1b6790127cd6c6d2b0a8c60a3fcf944e | |
parent | ea30bcdfef5c869f5b37a1d9af8b7ea32ba25cb4 (diff) | |
parent | e630591aeafd164d9cb83508462ff2fac55aa6d5 (diff) |
Merge pull request #27927 from theisegeberg/#27925_trimHalvesAudio
Fixes WAV import being cut in half with new trim code
-rw-r--r-- | editor/import/resource_importer_wav.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 52dec47343..fdf1103258 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/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; } } |