Releases: dmrschmidt/DSWaveformImage
Releases · dmrschmidt/DSWaveformImage
14.5.0
14.5.0
Added
- Multi-channel rendering, including a dedicated stereo mode. Renderers can now interpret audio as
.merged(default, unchanged),.specific(N)for a single channel, or.stereofor a split L/R image. Use viaLinearWaveformRenderer(channelSelection:)or the newLinearWaveformRenderer.stereofactory; passchannelSelection:toWaveformAnalyzer.samples(...)if you're consuming raw samples. See Multi-Channel (Stereo) Support in the README. #111
Fixed
- Multi-hour audio files no longer crash with OOM (#93). The end-of-loop backfill in
WaveformAnalyzerpreviously padded the input sample buffer with up to gigabytes of zeros when the read produced fewer samples than the target (most commonly when the reader was interrupted by backgrounding). It now pads the output array with silence-equivalent floats — allocation is O(target), independent of audio duration. Per-chunk reads are wrapped inautoreleasepoolto keepCMSampleBufferreferences from pinning memory during long reads. CircularWaveformRenderer(kind: .ring(_))now renders a true annulus for.filled,.gradient,.outlined, and.gradientOutlined(previously only.stripedlooked right; the others filled the inner disk).
Changed
WaveformAnalyzer.AnalyzeErrorgained.invalidChannelIndex(requested:available:)for the new.specific(N)selector. Source-breaking for exhaustive switches without@unknown default:.
Full Changelog: 14.4.0...14.5.0
14.4.0
Full Changelog: 14.3.0...14.4.0
14.3.0 - Allow passing AVAsset to waveform analyzer
What's Changed
- Allow passing
AVAssetto waveform analyzer by @mihai8804858 in #110
New Contributors
- @mihai8804858 made their first contribution in #110
Full Changelog: 14.2.2...14.3.0
14.2.2 - striped rendering fix
Fixes an issue w/ striped rendering always drawing the last stripe as a line instead of a proper bar.
14.2.1 - fix an issue with macOS API
14.2.0
Re-add ability to position waveform when using the image APIs.
14.1.2
14.1.1
- remove vision OS support for now again as it was causing troubles with Xcode 14
14.1.0
- add the possibility to handle "loading" state in WaveformView - courtesy of @alfogrillo in #82
- add support for visionOS - courtesy of @tapsandswipes in #81
14.0.0
- Minimum iOS Deployment target is 15.0, macOS is 12.0 to remove internal usage of deprecated APIs
WaveformAnalyzerandWaveformImageDrawernow returnResult<[Float] | DSImage, Error>when used with completionHandler for better error handlingWaveformAnalyzeris now stateless and requires the URL in.samples(fromAudioAt:count:qos:)instead of its constructor- SwiftUI's
WaveformViewhas a new constructor that provides optional access to the underlyingWaveformShape, which is now used for rendering, see #78