Widephase decodes some audio formats with a narrow build of FFmpeg 8.1.3. The libraries shipped inside the iOS app are replaceable: libavutil, libavcodec, libavformat and libswresample.
This directory is the corresponding source, the exact patch, and the script used to build those libraries.
Verify the archive
The official FFmpeg 8.1.3 tarball is identical to the copy we build from. It is about 11 MB, so this site points to the official file rather than hosting another copy:
https://ffmpeg.org/releases/ffmpeg-8.1.3.tar.xz
SHA-256 (also in SHA256SUMS):
7138d28c96d9d3e3af4ee3d8cad72741f8ffb40da90c1112235dea3ecd3178a3 ffmpeg-8.1.3.tar.xz
Files on this page
- README.md — full rebuild notes
- SHA256SUMS
- dstdec-8.1.3.patch — unified diff against
libavcodec/dstdec.c - patch-dst.py — the same change, as applied by our build script
- build-dsd-decoder.sh — configure and package the iOS libraries
- COPYING.LGPLv2.1 — GNU LGPL 2.1
Apply the only source change
tar -xf ffmpeg-8.1.3.tar.xz python3 patch-dst.py ffmpeg-8.1.3 # or: patch -p1 -d ffmpeg-8.1.3 < dstdec-8.1.3.patch
The patch handles uncompressed DST frames and, when avctx->opaque is set for Widephase raw DSD, compacts the four-byte-stride buffer to lossless MSB-first DSD bytes.
Rebuild
The script configures FFmpeg 8.1.3 with --enable-shared --disable-static, --disable-gpl --disable-nonfree --disable-version3, and only these pieces enabled: decoders dsd_msbf,dst,flac,ape,wavpack,vorbis,opus; demuxers flac,ape,wv,ogg; parsers flac,opus,vorbis; protocol file; plus swresample. It does not use -ffast-math or flush-to-zero flags. See README.md for how to replace the frameworks inside the app and re-sign them.
Written offer
If you received a copy of Widephase and cannot download these files, email support@widephase.com and ask for the corresponding FFmpeg 8.1.3 source, this patch, and this build script for the version you have. We keep that offer open for at least three years after we last distribute that version, and at least as long as we offer support for it.