diff options
author | Theis Egeberg <theis.egebrerg@gmail.com> | 2019-04-11 17:17:33 +0200 |
---|---|---|
committer | Theis Egeberg <theis.egebrerg@gmail.com> | 2019-04-11 17:17:33 +0200 |
commit | e630591aeafd164d9cb83508462ff2fac55aa6d5 (patch) | |
tree | 1f75b476257904f75d9bd1310cd4e3a02c3bdcfb | |
parent | edc9097bc1604f0bd5ea7136c518699e9d64a731 (diff) |
Removed extra division by format channels causing sounds to get halved.
-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; } } |