Add support for reading and writing RF64 WAVE files

This commit is contained in:
Vanilagy
2025-07-18 16:48:23 +02:00
parent 2277810853
commit 4b12468008
10 changed files with 124 additions and 22 deletions
+15
View File
@@ -35,6 +35,21 @@ export class RiffReader {
return view.getUint32(offset, this.littleEndian);
}
readU64() {
let low: number;
let high: number;
if (this.littleEndian) {
low = this.readU32();
high = this.readU32();
} else {
high = this.readU32();
low = this.readU32();
}
return high * 0x100000000 + low;
}
readAscii(length: number) {
const { view, offset } = this.reader.getViewAndOffset(this.pos, this.pos + length);
this.pos += length;