Skip to content

sync: v3 < dev - #217

Open
1Lucas1apk wants to merge 99 commits into
v3from
dev
Open

sync: v3 < dev#217
1Lucas1apk wants to merge 99 commits into
v3from
dev

Conversation

@1Lucas1apk

@1Lucas1apk 1Lucas1apk commented Aug 4, 2026

Copy link
Copy Markdown
Member

Changes

Release v3.9 with new features, improvements, bug fixes, performance optimizations, and dependency updates.

Why

Merges all changes from the dev branch into v3 to prepare the v3.9 release.

Additional information

This pull request contains the complete set of changes planned for the v3.9 release.

ToddyTheNoobDud and others added 30 commits April 30, 2026 13:50
this is the gap between heapTotal and the v8 heap space, this revels v8
internal memory.
fixes the npm build error.
Added support for playing tiktok videos.
After some researching and testing, aead_xchacha20_poly1305_rtpsize runs
natively on libsodum + has support for encrypt_into apis, that on my
machine, gave an 300% speed boost in decrypt/encrypt packets, since it
runs on sodium-native or libsodium-wrappers, only by running on these
packages makes it faster. Also tested with bun, sodium-native is still
faster than it by ~80%.
Fixed fadeTo/tapeTo/setFadeVolume silently no-oping on
connection.audioStream   (missing from _assignStream proxy)
Fixed 'audioStream' event listener being dead code (voice lib never
emits it)
Fixed 'reconnecting' connection status never firing (voice lib uses
connecting state, not reconnecting)
Fixed pause detection broken (voice lib uses idle+reason='paused', not
status='paused')
Fixed double-destroy race in _cleanupCurrentAudioStream
Fixed stuck detection conflict (set stuckTimeout above player threshold)
Fixed force=true reconnect being no-op when token+endpoint unchanged
Fixed ping -1 not caught by nullish coalescing

Implement setLoudnessNormalizer runtime toggle via
VolumeTransformer.setAGCEnabled
Handle circuit breaker disconnect reason
Update type declarations to match actual voice lib behavior
Remove 'seamless_bridge' from playing reason check, add 'unpaused'
Formmated the entire code with biome.
Replaced the circular ring buffer (RING_SIZE, writePos/readPos tracking,
swap buffer for wrap-around copies) with a straightforward leftover
strategy. Incoming chunks are concatenated with any leftover bytes using
bufferPool, full frames are encoded in a single pass, and remaining
bytes are saved for the next transform call. This reduces memory
overhead (no fixed 512KB ring allocation), eliminates wrap-around
complexity, and properly releases pooled buffers on error and flush.

After testing this for 2d, managed to get a 97% buffer reuse, which
alones gets an ~200/400mb saving in memory.
since its gonna be an LTS in october, and can run TS natively, i have
updated the experimental flag and fixed an error on config validator
causing it to crash on startup.
Since tidal does not seem to work now, will be default to qobuz.
Replaced the fragile NODE_UNIQUE_ID environment variable approach with
an explicit two-step identification protocol:

Master sends clusterId via IPC on fork
Worker confirms identity with HELLO packet (incl. PID) over event socket

Changed eventSockets from Set to Map keyed by worker ID. This enables
reliable mapping, stale socket cleanup on reconnect, and correct stats
attribution

Fixes an issue where /v4/workers showed complete stats only for worker
ID 1 all workers reported workerId: 1, so their stats overwrote each
other, leaving other worker IDs with only the initial { players: 0,
playingPlayers: 0 } stub.
resampler.destroy() was being called twice.
Lazily allocate tape/scratch effect buffers only when those effects are
used, instead of retaining them for every playback pipeline.

Lowered oversized AAC and WebM demux ring buffer defaults that were
retained per active stream.

Added teardown cleanup for playback filters and mixers so ended streams
release native buffers promptly.

From my tests on the playback worker, with 19 active players, the
JSArrayBufferData went from ~146MB to ~19.5MB.
This should help with client compatibility.
* fix: dynamicly spelling to dynamically

Signed-off-by: Ramkrishna <144999854+ramsquishna@users.noreply.github.com>

* fix: exaustive spelling to exhaustive

Signed-off-by: Ramkrishna <144999854+ramsquishna@users.noreply.github.com>

---------

Signed-off-by: Ramkrishna <144999854+ramsquishna@users.noreply.github.com>
Symphonia v0.6.0
Rubato v2.0.0
And fixed FLAC playback, ig thats good.

New repo: https://github.com/ToddyTheNoobDud/symphonia-decoder
Pass abort signal into DASH segment fetches so stop() cancels in-flight
downloads. Refactor DASHHandler backpressure from data-event drain
detection to _read()-driven read-waiters. Replace .pipe() with
pipeline() for
proper error propagation and cleanup. Remove removeAllListeners() from
streamProcessor and AudioMixer in favor of owned listener cleanup.
Delete unreachable duplicate writableNeedDrain early-return in YouTube
recovery.

Also fixed an 403 error happening on bandcamp (by adding an Referer, and
fixed getTrackUrl capturing an trailing JSON.)
This seems to be no longer experimental and can be used in prod, since
bun got some major stability updates.
Also fix a crash ocurring during startup.
ToddyTheNoobDud and others added 29 commits July 4, 2026 16:45
fix(spotify): use search.maxResults configuration for search limit
This commit adds support for alac playback.
TVHTML5 has enforced SABR, currently only itag 18 returns
signatureCipher + url.

the downgraded version seems to not enforce SABR since its made for
"older" devices.
this channel_id will be used in voice, to fix "Failed to set external
sender: AlreadyInGroup"
now if you are running with bun, it should no longer try to update with
npm/pnpm
Opus allocation now reuses encoder/decoder scratch buffers
(encodeInto/decodeInto). Since these methods are zero-aloc, this should
eliminate significant RSS growth.

In the player, natural trackEnd fallback paths now use normal voice
cleanup. This should prevent finished streams and resources from
remaining attached.

Mixers are now destroyed after playback instead of remaining allocated.

Ducking resources (decoders, speaker streams, etc.) are now removed when
no track exists.

YouTube range requests are now capped at 12 seconds/512 KB, which seems
to cause fewer recovery attempts. Content-Range is also revalidated
before accepting resumed bytes, which should hopefully fix error 416.

For HTTP responses, buffered/decompressed responses now remove listeners
and release captured chunks immediately instead of taking longer to do
so.
should fix the mirroing for audios like: Ai Đưa Em Về (feat. Lê Thiện
Hiếu)
improve SABR recovery, seeking, segment continuity, and pause handling.
was getting too much frequent 403s, so just added a fallback w/ the
search api
should no longer make errors when they are not configured.
Web_remix just updated to youtube-music app user-agent

In amazon music added 2 extra headers and updated the version.

In instagram, added support for the new logged-out api/params for
reels/post.

in kwai, reworked the integration to match the new naming, seems they
changed a lot ig. Also changed it to use .pipeline() instead of using
.pipe()

Pinterest on some pins return m3u8 formats, so added support for it.)

Reddit now needs a loid cookie to acess comments, posts, .json, etc
(x-reddit-loid)

spotify updated the hashes, and fixed an issue where: when the worker
entered an hibernation mode, and came back, it would not resolve songs.

in vimeo, refactored the entire thing to work without doing curl
requests, its still experimental, but should be stable enough, hard
times with turnstile
This should allow to follow the continuation tokens when resolving
playlists, preventing to be truncated.

(Eg: an playlist has 500 tracks, yt strictly truncates the init request
to 200 tracks only, but with continuation it allows to continue
resolving until it hits 500. Note: the request will be slower btw.)
The decoder now reads the AAC core frequency from MP4’s
AudioSpecificConfig instead of guessing from the displayed track sample
rate.

Should fix playback for some specific itag 18 playbacks.

(Originally, fixing itag 18 would only require removing the sample rate
halving, but that could cause issues later with other MP4 files.)

also improved MP4 memory handling by releasing metadata prefetch and
header buffers after init.
Only supports the /audio/ section, and only resolves direct songs urls.
Pretty cool a mp3 320kbps tbh.
note: not all songs will work !!!, this is experimental.
Should allow to prioritize lyrics providers even if all are enabled,
example, lrclib can be tried first instead of always being the last one.
process players sequentially with a small delay to avoid locking the event loop
on huge groups.
fallback to empty array if preferredSources is missing in lyrics config to prevent crashes.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


3 out of 5 committers have signed the CLA.
✅ (ToddyTheNoobDud)[https://github.com/ToddyTheNoobDud]
✅ (1Lucas1apk)[https://github.com/1Lucas1apk]
✅ (realkalashnikov)[https://github.com/realkalashnikov]
@UnschooledGamer
@ramkrishna
Ramkrishna seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants