Implement MP3 demuxer

This commit is contained in:
Vanilagy
2025-01-26 10:01:09 +01:00
parent 387c4dc525
commit 7205d9445b
6 changed files with 464 additions and 25 deletions
+4
View File
@@ -27,6 +27,10 @@ export class Reader {
async loadRange(start: number, end: number) {
end = Math.min(end, await this.source._getSize());
if (start >= end) {
return;
}
const matchingLoadingSegment = this.loadingSegments.find(x => x.start <= start && x.end >= end);
if (matchingLoadingSegment) {
// Simply wait for the existing promise to finish to avoid loading the same range twice