Merge pull request #75261 from AThousandShips/wav_trim

Fix trim when importing WAV
This commit is contained in:
Rémi Verschelde 2023-06-09 15:31:15 +02:00
commit 0e0758c5cd
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

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