Files
foo_input_joc/.github/workflows/build.yml
T
TheM14 5c0f9ea2ff
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
Sync the 1.3.1 kernel and read the stream until its first JOC frame
The kernel copy follows JustOneCacophonyCXX 1.3.1: a frame without JOC metadata
mid-stream now holds the previous matrices instead of switching to the core
planes, which removes the clicks the 6.0 kernels produced on encoders that drop
the JOC metadata for single frames.

resolve_bed_channels() called ReadFile once and scanned that single chunk.  A
read returns only the bytes that are available (a pipe hands over a partial
chunk), and an encoder may leave the first audio frames without JOC metadata,
so the first JOC frame could sit past the window.  The scan then fell back to 6
bed channels, and the first JOC frame (joc_dmx_config_idx=1, 8 channels) was
rejected with core_channel_count_mismatch.  The scan now reads 64 KiB chunks
until the first syncframe carrying the JOC EMDF container is seen, keeps the
trailing partial frame between reads, and rewinds the stream as before; the
container path and the bare-file path both use it.

Bump the component version to 0.6.1, and pin the kernel notices to 1.3.1.

Verified with the offline harness: the reported GNR M4A now reports
"joc_dmx_config_idx=1 -> 8 bed channel(s)" and decodes the whole track (8906
frames), and the Smooth Criminal opening no longer steps at the two frames
without metadata (6.016 s and 7.328 s).
2026-11-10 15:35:32 +08:00

82 lines
2.6 KiB
YAML

name: build
# Builds both architectures, publishes the two installable component packages as
# workflow artifacts, and — when a tag is pushed — turns them into a GitHub release.
# The SDK is fetched from foobar2000.org at build time (tools/setup_sdk.ps1) and the
# renderer sources are part of this repository (kernel/, synced from JustOneCacophonyCXX
# version 1.3.1), so nothing else is needed.
on:
push:
branches: [ main, master ]
tags: [ 'v*' ]
pull_request:
workflow_dispatch:
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Fetch the foobar2000 SDK (target 1.5/1.6)
shell: pwsh
run: ./tools/setup_sdk.ps1 -TargetVersion 80
- name: Check the tag against the component version
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
run: |
$declared = (Select-String -Path src/main.cpp -Pattern '#define JOC_VERSION "([^"]+)"').Matches[0].Groups[1].Value
$tag = '${{ github.ref_name }}'
if ($tag -ne "v$declared") {
throw "the tag $tag does not match JOC_VERSION $declared; the release would be mislabelled"
}
- name: Build both architectures and package them
shell: pwsh
run: ./tools/package.ps1
- name: List the packages
shell: pwsh
run: Get-ChildItem dist -Filter *.fb2k-component | Select-Object Name, Length
- name: Upload the x86 component (foobar2000 1.6 and 2.x 32-bit)
uses: actions/upload-artifact@v4
with:
name: foo_input_joc-x86
path: dist/*-x86.fb2k-component
if-no-files-found: error
- name: Upload the x64 component (foobar2000 2.x 64-bit)
uses: actions/upload-artifact@v4
with:
name: foo_input_joc-x64
path: dist/*-x64.fb2k-component
if-no-files-found: error
release:
# A pushed tag is what makes a release; branch builds only leave artifacts.
if: startsWith(github.ref, 'refs/tags/')
needs: windows
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Collect the packaged components
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: List what will be published
run: ls -l dist
- name: Create the release for this tag
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
files: dist/*.fb2k-component
fail_on_unmatched_files: true
generate_release_notes: true