Merge pull request #78048 from AThousandShips/wav_trim_3_x

[3.x] Fix trim when importing WAV
This commit is contained in:
Rémi Verschelde 2023-06-09 15:40:38 +02:00 committed by GitHub
commit b3396b093b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -404,7 +404,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
bool trim = p_options["edit/trim"];
if (trim && (loop_mode != AudioStreamSample::LOOP_DISABLED) && format_channels > 0) {
if (trim && (loop_mode == AudioStreamSample::LOOP_DISABLED) && format_channels > 0) {
int first = 0;
int last = (frames / format_channels) - 1;
bool found = false;