Skip to content

Commit 6cfb3f6

Browse files
committed
Merge pull request #85556 from bs-mwoerner/wav-import-fix
Fix importing WAV files with odd chunk sizes
2 parents b38a7ae + 2981037 commit 6cfb3f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

editor/import/resource_importer_wav.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
292292
loop_end = file->get_32();
293293
}
294294
}
295-
file->seek(file_pos + chunksize);
295+
// Move to the start of the next chunk. Note that RIFF requires a padding byte for odd
296+
// chunk sizes.
297+
file->seek(file_pos + chunksize + (chunksize & 1));
296298
}
297299

298300
// STEP 2, APPLY CONVERSIONS

0 commit comments

Comments
 (0)