sync: v3 < dev - #217
Open
1Lucas1apk wants to merge 159 commits into
Open
Conversation
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.
fix: resolve audio stream, demuxer, and source bugs
fix: prevent profiler file symlink escapes
Signed-off-by: Lucas Morais Rodrigues <76886832+1Lucas1apk@users.noreply.github.com>
routeplanner.ts has no dot in the filename, so it was getting registered as a single static route at /v4/routeplanner instead of the actual paths the handler dispatches on. every request to the route planner api was 404ing before the handler even ran, regardless of your routePlanner config
Since bilibili seems to be global now (as of the *.tv urls)
If a client keeps returning 403s, now it will fallback to the next configured client instead of looping infinite retries.
this seems to be more realiable... again... Should fix android failing to search some specific songs.
setup() now retries the player script and logs a warning instead of failing source initialization. A late success self-heals since every playback op calls getCachedPlayerScript() lazily anyway (also removed the extra log i added for visitorData, i forgot since i was testing it.)
should fix prefixes like "speak", "tts", "gtts", etc, not working. this happens because while building the source name, GoogleTTSSource produces googletts, while the actual name for it is google-tts. For pipertts is just missing an extra 'tts' on it.
…ents fix: prevent duplicate stream terminal events
fix: register routeplanner sub-routes correctly
- karaoke, tremolo, vibrato, rotation, distortion, echo, chorus, compressor, lowpass, highpass, phaser, spatial rebuild a fresh object before applyAnimatedUpdate() and drop transition
fix: forward transition field in 12 AnimatableFilter subclasses
All thanks to: LuanRT/BgUtils#44 which is the base for this commit. Should fix sps 2 for most people hopefully.
This should fix when a error happens in sabr (eg: sps 2) the player kept trying to recover the session even after it got destroyed.
skipMarginMs was accepted by the type and forwarded by the PATCH handler, but never assigned in updateSponsorBlock, so it was silently dropped.
fix: apply skipMarginMs in updateSponsorBlock
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.