Skip to content

sync: v3 < dev - #217

Merged
1Lucas1apk merged 177 commits into
v3from
dev
Sep 13, 2026
Merged

1Lucas1apk merged 177 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 28 commits August 29, 2026 11:30
request shim was still using the old arrayBuffer-only path and
treating content-length: 0 as body (truthy string), also
Object.fromEntries collapsed set-cookie. now it checks len>0 ||
transfer-encoding and short-circuits for GET/HEAD, body handling is
a single arrayBuffer + emitEnd instead of the streaming reader mess.

ipc tracker was doing Buffer.byteLength(JSON.stringify(payload)) then
v8.serialize(payload) right after for process.send - double work
for every cluster message (kinda dumb). now its just
v8.serialize(payload).byteLength single pass.

added a small bun fast-path in makeRequest for stateless GET/HEAD
(no proxy/localAddress/streamOnly) - uses native fetch with abort
signal, falls back to http2/http1 on any error.
Now it should pages that return x-cache MISS,MISS, which og:url/html
doesn't contain the requested identifier.
Should fix clients not finding any player script to use hopefully.
trackEndSchedule used raw track-position ms as the setTimeout delay,
ignoring the active timescale/rate filter, so fades and stops fired
too early with timescale speed 0.75. also reschedule it after
setFilters, since a pending timer wasn't updated on speed change
fix: recompute trackEnd fade delay for playback speed changes
Enable keepMdatData on MP4Box to support non-faststart MP4 containers
where mdat precedes moov metadata.

Add eager WASM cleanup and backpressure draining across audio decoders
to prevent memory accumulation on stream teardown.

This should fix the mass accumulation of WASM/libsamplerate allocations
per-stream and JSArrayBufferData.
Remove all event listeners from CrossfadeController and pipeline
transforms on stream destruction to prevent closure retention.
Added Lavalink.lua to supported clients list

Signed-off-by: filispeen <72784386+filispeen@users.noreply.github.com>
HTML matching for shazam has been breaking a lot, switching to apple's
music api for resolving it seems to be better for now. Its faster, will
consume less recourses hoppefully and more realiable.

(Removed all the html code since i don't pretend to use it)
I din't test it much, but seems to be working for now.
Re-supply identical voice state and explicitly reconnect when the
connection is disconnected/destroyed or the voice library lost its
voice state. Leave connecting handshakes alone so client retries do
not tear down an in-flight connection.

Reset the voice connection after the reconnect circuit breaker, since
reusing the same connection keeps the old reconnect counters and trips
the breaker again immediately. Report breaker and voice timeouts as
suspicious rather than generic faults.

Repair missing cluster players by recreating the worker player and
retrying mutating commands once. Also repair player-state reads and
fix stale worker cleanup to use session keys.

This should fix players staying silent after a successful voice
reconnect without requiring destroy/play again, and reduce Player not
found errors after worker failure.
payload.endTime ?? undefined collapsed an explicit null into undefined before reaching seek(),
so an explicit clear couldn't be told apart from the field being omitted
fix: preserve explicit null endTime through seek pipeline
Arruma o erro ' Uncaught Exception: Error [ERR_MODULE_NOT_FOUND]: Cannot find module'
fix(spotify): add GraphQL fallback for recommendations
Add Lavalink.lua to supported clients list
if you are testing a web player (locally with no server, file:// pages,
which sends a null origin) you can now configure cors to be
disabled/enabled.

(true = allow browser web players from any origin)
Equalizer only runs bands with non-unity gain instead of all 15 biquads
per sample.
AudioMixer reuses the shared silence frame as mix base instead of
allocating per tick.
Opus encoder/decoder copy scratch output without the intermediate
subarray view.
BufferPool bucket depth 4 to 16 for hot frame sizes.

in my machine, this is the results i got (can vary):

EQ, 1 band active: ~154us -> ~50us per chunk. Saves 5.2ms core/s per
EQ-active player.
EQ, 3 bands: ~56% faster.
Opus scratch copy: ~20% faster per op, just one less object per frame.
Route all cross-stream error emits through a guarded helper that skips
destroyed or listener-less sinks, since emitting with zero listeners
throws and escapes as uncaught. Tolerate pipeline premature-close in the
master uncaught handler the same way the playback worker already does.

(Example: this should fix a crash when you had a audiomixer instance and
used stop [not destroy], it would crash the worker.)
…rity

fix: resolve ratelimit, worker eviction, body hang, and path traversal
@1Lucas1apk
1Lucas1apk merged commit cdb02c6 into v3 Sep 13, 2026
1 check failed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.