fix(mobile): fast track load + pitch-preserving tempo on chunked engine#242
Merged
Conversation
Three changes to chunkedAudioEngine.js: - CHUNK_SEC 10 -> 5: halves the initial chunk download (~10 MB -> ~5 MB for 6 stems), reducing the first-play buffering time. - ready() no longer blocks on chunk 0 download. It resolves after the parallel WAV header fetches (~6 x 1 KB) and kicks chunk 0/1 off in the background. play() already handled the not-yet-cached case, so first play is gapless once the background fetch finishes. Track appears ready in the UI in ~100 ms instead of several seconds. - Add SoundTouch WSOLA AudioWorklet on the master bus (same pattern as audioEngine.js) and expose setPlaybackRate(). The mobile speed slider was already wired to call this method, but it was missing from the API so the control silently did nothing. Pitch is now preserved at all speeds on mobile.
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.
Summary
engine.setPlaybackRate()but the method was missing from the API - voices and instruments now stay at original pitch when tempo changes.Test plan