- Check file size with statSync BEFORE reading into memory - Files >50MB (~4.5min PCM) are never loaded into RAM, always streamed - Also skip if total cache would exceed limit (no more read-then-discard) - Fixes 1GB+ RAM spike when playing long audio files |
||
|---|---|---|
| .. | ||
| src | ||
| package-lock.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||