The native decoder is compiled against fork/files/audio/decode/joc_stream.h,
but the workflow builds joc_core from the current JustOneCacophony main
branch. Version 1.3.3 appended pcm_layout to joc_stream_config; the stale
1.3.1 header made struct_size disagree with the core, so joc_stream_create()
failed and every E-AC-3 JOC file stopped initializing.
Sync the header with include/joc_stream.h, including
JOC_STREAM_IN_PCM_LAYOUT and the pcm_layout field, so the native decoder
matches the 1.3.3 core ABI.
This only restores the existing JOC path; ad-joc-pcm is not implemented yet.
- Use a unique temp WAV per PcmEngine so concurrent or reopened PCM sources
cannot overwrite each other.
- Truncate PcmEngine reads at the decoded duration and reset the emitted
position on seek.
- Only fall back to PCM after a successful "not JOC" verdict; a failed JOC
probe now leaves the input alone instead of stealing a potentially JOC
source.
- Add the joc-pcm script option and document it in the config example.
- Add PcmEngine: ffmpeg decodes to 48 kHz float32, the kernel PCM_LAYOUT
input maps 2.0/5.1/7.1 and renders binaural.
- Fall back to the PCM path for non-JOC audio in MP4/Matroska/WebM, including
TrueHD, while preserving JOC detection first.
- Wire the PCM engine through audio_source, seeking and HTTP serving.
- Sync the bundled kernel headers to 1.3.3.
Both copies of joc_version.h follow the main repository: third_party/joc/
include for the cplugin and fork/files/audio/decode for the ad_joc patch now
carry JOC_VERSION_STRING 1.3.1. joc_core.h and joc_stream.h are unchanged, so
the public ABI stays at 6 and neither integration needs a code change. The
kernel behaviour behind the version (a mid-stream frame without JOC metadata
holds the previous matrices instead of switching to the core planes) reaches
the builds through the main branch they compile against.
tools/verify_kernel.ps1 reports all three headers byte-identical to the 1.3.1
checkout.
Both copies of the three public headers follow the main repository:
third_party/joc/include for the cplugin and fork/files/audio/decode for the
ad_joc patch now carry joc_core.h, joc_stream.h and joc_version.h from
JustOneCacophonyCXX abce846 (version 1.3.0). The fix behind them turns an
ID14 payload that ends inside joc_data into a frame status (7) instead of a
stream error, so the renderer holds the previous matrices and playback
continues; joc_stream_status_info gains an appended truncated_joc_frames
field while JOC_ABI_VERSION stays at 6, so neither integration needs a code
change.
tools/verify_kernel.ps1 reports all three headers byte-identical to the
checkout. tools/build.ps1 -JocCoreSource compiles joc_mpv.dll against the
synced headers and builds joc_core.dll from the fixed source; with that core
next to the portable mpv build, --ad=joc plays the reported M4A to the end
instead of stopping at 2:12.672.
Both copies of joc_core.h follow the main repository: third_party/joc/include
for the cplugin and fork/files/audio/decode for the ad_joc patch now carry
JOC_ABI_VERSION 6, frame parameters and EMDF payload info at v2, the
JOC_FRAME_STATUS_* values and the calling convention chosen per platform.
joc_stream.h and joc_version.h are unchanged, so neither integration needs a
code change.
The plugin compares the loaded core's abi_version() with JOC_ABI_VERSION at
load time, so the vendored header has to match the new joc_core.dll.
Rebuilt against commit 3f0d5e87fe41b90d9350528d2dca2ca82a637a3f with
-DJOC_CORE_SOURCE: joc_mpv.dll and joc_core.dll build, the plugin compiles
against ABI 6, and the built joc_core.dll reports abi 6 / version 1.2.0.
Both copies of joc_version.h follow the main repository: third_party/joc/
include for the cplugin and fork/files/audio/decode for the ad_joc patch
now carry JOC_VERSION_STRING 1.2.0. joc_core.h and joc_stream.h are
unchanged, so the public ABI stays at 5 and neither integration needs a
code change.
Rebuilt joc_core.dll from the 1.2.0 kernel with tools/build.ps1;
tools/verify_kernel.ps1 reports all three headers byte-identical, and
joc_cli.exe --version reports 1.2.0 (joc_core ABI 5). The warp and trim
behaviour arrives through the unchanged joc_stream surface.
The previous change dropped the SOFA input but left two lines of the old disk
cache block inside create(): the stream config was still assigned
hrtf_cache_policy, which the kernel no longer has, and the brace that closed the
block ended the binaural branch early. Both compilers stopped there, so the
Windows and the Android build agreed on the error.
The frame-length message in feed() is a size_t and uses %zu now, which the same
build reported as a warning.
ad_joc.c still asked the stream config for hrtf_sofa_path, hrtf_cache_dir and
hrtf_cache_policy, which the kernel no longer has; the same file is compiled by
the Windows and the Android build, so both stopped there.
The decoder now recognises only the Rosella model -- a JSON file containing a
personalized_hrtf object -- and passes its path to personalized_headphone_path.
The SOFA magic sniffing, the .jochrtf extension branch, the default cache
directory and the disk-cache retry path are gone, the default lookup is
HRTF/binaural.personalized_headphone, and the format warning for the frame length
uses %zu. The README, the fork docs and the example configs name the model file
instead of binaural.sofa.
The kernel renders the Rosella .personalized_headphone model or an already
compiled .jochrtf field, and only the first is a user-facing input: the SOFA
reader and its compile cache left the library. joc-hrtf-source, joc-hrtf-cache
and joc-hrtf-cache-dir go with them, and the default file is now
binaural.personalized_headphone only.
The plugin sets personalized_headphone_path directly, and the disk-cache retry
path disappears with the cache itself. The headers in third_party/joc/include
and fork/files/audio/decode follow the new kernel, so the config structs no
longer carry hrtf_sofa_path, hrtf_cache_policy, hrtf_cache_dir or hrtf_radius_m,
and the rosella filterbank no longer needs its SOFA exception.
The example config and the option tables in both READMEs drop the removed keys.
Builds against the kernel with tools/build.ps1 -JocCoreSource.
The listing comes from unzip -l, so entries are newline separated; the
glob compare used spaces and reported every library as missing even
though the APK was complete.
path.sh reads $cores before setting it, which aborts under set -u; the
step only needs depinfo.sh for the NDK version, and ndk-build is told
the job count directly.
The app's MPVLib loads libplayer.so before libmpv, and mpv-android builds
that bridge with ndk-build over app/src/main/jni, installing it and the
prebuilt ffmpeg/mpv objects into app/src/main/libs/<abi>. The workflow
only built the mpv target and then ran Gradle, so the APK shipped
without libplayer.so and every playback died with UnsatisfiedLinkError.
Run ndk-build the way buildscripts/scripts/mpv-android.sh does, and write
ndk.properties, which the Gradle build needs to find the NDK for symbol
stripping (the previous APK carried 134 MB of unstripped libraries).
The Android libmpv.so has DT_NEEDED entries for libavcodec, libavfilter,
libavformat, libavutil, libswresample, libswscale and libavdevice, but
the app only carried libmpv.so, libjoc_core.so and libc++_shared.so, so
the linker rejected libmpv at dlopen time and the player crashed on
every file.
Copy every shared object from the cross-build prefix into the app's
libs/<abi> directory, and into the standalone library artifact too,
instead of naming the three files.
system lays them out
download-sdk.sh unpacks the SDK as buildscripts/sdk/android-sdk-linux,
and mpv-android keeps the libraries in app/src/main/libs with jniLibs
pointing at it. Check those names first, fall back to a platforms/
search, and write the libraries into libs/<abi> while recreating the
alias.
mpv-android ships app/src/main/jniLibs as a symlink for the ABI its own
build wants, so mkdir -p fails with "File exists" when the link target
does not exist. Replace the link (or file) with a plain directory and
copy the three libraries into arm64-v8a/.
The arm64 job stopped at the three shared libraries, so the only way to
use them was to build a player around them. Let the libraries go into
mpv-android's jniLibs and let Gradle assemble and sign the app instead.
- copy libmpv.so, libjoc_core.so and libc++_shared.so into
app/src/main/jniLibs/arm64-v8a
- locate the SDK under buildscripts/sdk, accept its licences, and link
the unpacked NDK where AGP looks for it
- run assembleRelease with a throwaway injected signing key, so the APK
installs without repository secrets
- verify the signature when apksigner is available and upload the APK as
mpv-joc-android-arm64-v8a-apk, keeping the bare libraries as before
- cache the Gradle home between runs
- document the artifact and how to pass the ad_joc options
Checked locally: the workflow parses and every shell block passes
bash -n; the Gradle build itself needs a CI run.
The kernel can now render the Rosella path through either bank; expose
that choice in both front ends with the same values and the same
default.
- plugin: joc-rosella-filterbank = 1|2 (public|captured); unset means
the kernel default (the public bank), and it applies only to
joc-hrtf-source=rosella, logging a warning otherwise
- fork: --ad-joc-rosella-filterbank, the same values and default; it
sits in the ad_joc option group, so it is read only when ad_joc
decodes a Rosella model
- log the bank actually selected (public|captured) on both paths
- add a bank-2 case to tools/verify_parity.ps1
- document the key in both READMEs and the example config
Checked: the plugin builds, the option parser covers the numeric and
named spellings plus invalid values, and for both banks the plugin's
PCM is bit-identical to joc_cli with --rosella-filterbank 1|2.
The kernel replaced the reserved words with rosella_filterbank and
bumped the task config version to 4; joc_task_config and
joc_stream_config keep their sizes, so the ABI stays compatible.
- Update third_party/joc/include/joc_core.h and joc_stream.h
- Update the copies ad_joc compiles against in
fork/files/audio/decode/
tools/verify_kernel.ps1 reports the public headers byte-identical to
the upstream checkout.