mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-26 15:55:35 +00:00
Major rewrite of the audio export pipeline for stability and memory efficiency: ## Streaming Decode - Primary decode path uses WebDemuxer + AudioDecoder (WebCodecs streaming) - Falls back to bulk decodeAudioData if streaming fails - Avoids holding full compressed file + decoded PCM simultaneously ## Chunked Offline Rendering - Processes timeline in 30-second OfflineAudioContext chunks - Memory bounded to ~30s of PCM per chunk regardless of recording length ## Chunked WAV Writing - Writes PCM in ~256KB chunks instead of single massive ArrayBuffer - Eliminates OOM for long recordings on the native/FFmpeg export path ## Chunked Encoding - Single AudioEncoder kept alive across all chunks (clean AAC stream) - Proper backpressure and error propagation per chunk ## scheduleBufferThroughTimeline chunk windowing - Clips source nodes to chunk boundaries for correct cross-chunk audio - Backwards compatible defaults when no chunk params provided ## Other export fixes - Progress cap: 99% -> 100% in both exporters and UI - Muxing errors: propagated instead of silently swallowed - Mac recording: enhanced warning when no audio files for muxing - Export timeout: eliminated by removing real-time rendering