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).
283 lines
14 KiB
XML
283 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
joc_kernel: the JustOneCacophony rendering core, built as a static library
|
|
(/MT) so the foobar2000 component can link the engine directly instead of
|
|
shipping and loading joc_core.dll.
|
|
|
|
The sources under kernel\src and kernel\include are a verbatim copy of the
|
|
upstream library at version 1.3.1 (see
|
|
JustOneCacophonyCXX\CMakeLists.txt): nothing under either
|
|
tree is edited here, and both are kept identical to it, so a single core serves
|
|
the upstream tools and this component alike. The static build needs no branch
|
|
of its own: JOC_STATIC (kernel\include\joc_core.h / joc_stream.h) and
|
|
EJOC_STATIC (kernel\include\eac3joc_core.h) are already part of the shared
|
|
headers, turning JOC_API and EJOC_API into empty macros.
|
|
|
|
Conventions deliberately mirror the component project (foo_input_joc.vcxproj)
|
|
and the kernel's own CMake build:
|
|
* configuration Release-Static, static CRT (/MT, MultiThreaded), no
|
|
redistributable;
|
|
* /fp:precise is mandatory, not cosmetic: the rendered output has to stay
|
|
bit-identical to the reference renderer, so no /fp:fast, no fast-math;
|
|
* /utf-8 (the sources are UTF-8) and /Zc:__cplusplus (joc_api.cpp reports
|
|
__cplusplus in its build-info string; without it MSVC answers 199711L);
|
|
* C++20, /permissive-, /W4, /O2 /Oi: the same flags CMake gives the MSVC
|
|
targets (JOC_MSVC_FLAGS in CMakeLists.txt), minus the /arch flags, which
|
|
belong to the individual SIMD units only.
|
|
|
|
ForcedIncludeFiles is NOT set: the component's src\joc_pch.h exists to pull
|
|
the standard library in ahead of the foobar2000 SDK headers, and the kernel
|
|
copy is a self-contained upstream tree that its own build force-includes
|
|
nothing into. Keeping the kernel's compile environment equal to the one the
|
|
library is validated with is what the bit-exactness contract depends on.
|
|
-->
|
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<ItemGroup Label="ProjectConfigurations">
|
|
<ProjectConfiguration Include="Release-Static|Win32">
|
|
<Configuration>Release-Static</Configuration>
|
|
<Platform>Win32</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="Release-Static|x64">
|
|
<Configuration>Release-Static</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup Label="Globals">
|
|
<ProjectGuid>{7B4E1D92-5C3A-4E0B-9F6D-2A8C41E7B530}</ProjectGuid>
|
|
<RootNamespace>joc_kernel</RootNamespace>
|
|
<ProjectName>joc_kernel</ProjectName>
|
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Release-Static'" Label="Configuration">
|
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
|
<PlatformToolset>v143</PlatformToolset>
|
|
<CharacterSet>Unicode</CharacterSet>
|
|
<UseOfMfc>false</UseOfMfc>
|
|
<UseOfAtl>false</UseOfAtl>
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
|
|
<ImportGroup Label="ExtensionSettings" />
|
|
<ImportGroup Label="PropertySheets">
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
</ImportGroup>
|
|
|
|
<PropertyGroup Label="UserMacros" />
|
|
|
|
<!--
|
|
The .lib lands next to the component's output: build\kernel-<Platform>\.
|
|
A separate IntDir per platform keeps the two architectures' objects apart.
|
|
-->
|
|
<PropertyGroup>
|
|
<OutDir>$(ProjectDir)..\build\kernel-$(Platform)\</OutDir>
|
|
<IntDir>$(ProjectDir)..\build\obj\joc_kernel\$(Platform)\</IntDir>
|
|
<TargetName>joc_kernel</TargetName>
|
|
</PropertyGroup>
|
|
|
|
<ItemDefinitionGroup>
|
|
<ClCompile>
|
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
<WarningLevel>Level4</WarningLevel>
|
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
|
<ConformanceMode>true</ConformanceMode>
|
|
<Optimization>MaxSpeed</Optimization>
|
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
<ExceptionHandling>Sync</ExceptionHandling>
|
|
<FloatingPointModel>Precise</FloatingPointModel>
|
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
<AdditionalOptions>/utf-8 /Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
|
|
<!--
|
|
JOC_STATIC: the public headers declare nothing imported or exported
|
|
(see kernel\include\joc_core.h), because these sources are archived
|
|
into a .lib instead of the upstream joc_core.dll.
|
|
EJOC_STATIC does the same for the inner engine entry points declared in
|
|
kernel\include\eac3joc_core.h: without it the units that call them
|
|
(task.cpp, stream.cpp, objects16.cpp, binaural_runtime.cpp, speaker_*)
|
|
see __declspec(dllimport), emit __imp_ejoc_* references and the archive
|
|
can never be linked, because a static library has no import library to
|
|
resolve them from. It covers the defining units too, including
|
|
src\joc_core\eac3joc_core.cpp, so the whole copy agrees on plain
|
|
symbols. No hardware-related or numerical behaviour is involved.
|
|
NDEBUG and _CRT_SECURE_NO_WARNINGS are the two defines the kernel's own
|
|
MSVC build passes (JOC_MSVC_DEFINES in CMakeLists.txt); the writers use
|
|
std::fopen on purpose, for seekable byte-exact output.
|
|
-->
|
|
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;JOC_STATIC;EJOC_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
</ClCompile>
|
|
</ItemDefinitionGroup>
|
|
|
|
<!--
|
|
SIMD units, mirroring CMakeLists.txt (the JOC_SIMD_* block).
|
|
|
|
The ISA in the file name, one translation unit per ISA, each compiled with
|
|
its own /arch because MSVC has no function-level ISA attribute; dispatch.cpp
|
|
(a baseline unit) picks one at run time from CPUID/XGETBV.
|
|
|
|
* x64 gets the AVX2 and AVX-512 units, JOC_SIMD_HAVE_SSE2 / _AVX2 /
|
|
_AVX512, and a per-file /arch for those two files only;
|
|
* Win32 (x86) gets the AVX2 unit and JOC_SIMD_HAVE_AVX2: AVX2 is not an
|
|
x86-64-only ISA. AVX-512 stays x64-only, because 32-bit mode addresses
|
|
ZMM0-7 only.
|
|
* src\simd\kernels_intrin_neon.cpp is excluded everywhere here: the CMake
|
|
build lists it only for aarch64 (CMakeLists.txt lines 177-180), which no
|
|
configuration of this project targets.
|
|
-->
|
|
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
|
|
<ClCompile>
|
|
<PreprocessorDefinitions>JOC_SIMD_HAVE_SSE2=1;JOC_SIMD_HAVE_AVX2=1;JOC_SIMD_HAVE_AVX512=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
</ClCompile>
|
|
</ItemDefinitionGroup>
|
|
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
|
|
<ClCompile>
|
|
<PreprocessorDefinitions>JOC_SIMD_HAVE_AVX2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
</ClCompile>
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- Verbatim copies of the upstream native library (JOC_REUSED_SOURCES). -->
|
|
<ClCompile Include="src\joc_core\eac3joc_core.cpp" />
|
|
<ClCompile Include="src\speaker\speaker_renderer.cpp" />
|
|
<ClCompile Include="src\binaural\binaural_renderer.cpp" />
|
|
<!-- Engine internals (JOC_INTERNAL_SOURCES). -->
|
|
<ClCompile Include="src\adm\adm_metadata.cpp" />
|
|
<ClCompile Include="src\adm\adm_tracks.cpp" />
|
|
<ClCompile Include="src\binaural\jochrtf_runtime.cpp" />
|
|
<ClCompile Include="src\binaural\jochrtf_renderer.cpp" />
|
|
<ClCompile Include="src\eac3_transport\eac3_reader.cpp" />
|
|
<ClCompile Include="src\emdf\emdf_parser.cpp" />
|
|
<ClCompile Include="src\foundation\bit_reader.cpp" />
|
|
<ClCompile Include="src\foundation\fft.cpp" />
|
|
<ClCompile Include="src\foundation\fs_utf8.cpp" />
|
|
<ClCompile Include="src\foundation\mini_json.cpp" />
|
|
<ClCompile Include="src\foundation\sha256.cpp" />
|
|
<ClCompile Include="src\foundation\status.cpp" />
|
|
<ClCompile Include="src\hrtf\jochrtf.cpp" />
|
|
<ClCompile Include="src\hrtf\public_filterbank.cpp" />
|
|
<ClCompile Include="src\hrtf\rosella_bank.cpp" />
|
|
<ClCompile Include="src\hrtf\rosella_filterbank.cpp" />
|
|
<ClCompile Include="src\hrtf\rosella_model.cpp" />
|
|
<ClCompile Include="src\hrtf\rosella_renderer.cpp" />
|
|
<ClCompile Include="src\hrtf\kernel_tables.cpp" />
|
|
<ClCompile Include="src\io\adm_writer.cpp" />
|
|
<ClCompile Include="src\io\hdf5.cpp" />
|
|
<ClCompile Include="src\io\inflate.cpp" />
|
|
<ClCompile Include="src\io\npy.cpp" />
|
|
<ClCompile Include="src\io\npy_writer.cpp" />
|
|
<ClCompile Include="src\io\process.cpp" />
|
|
<ClCompile Include="src\io\wav_writer.cpp" />
|
|
<ClCompile Include="src\io\zip_reader.cpp" />
|
|
<ClCompile Include="src\joc_bitstream\bed_layout_map.cpp" />
|
|
<ClCompile Include="src\joc_bitstream\joc_parser.cpp" />
|
|
<ClCompile Include="src\joc_core\objects16.cpp" />
|
|
<ClCompile Include="src\oamd\oamd_math.cpp" />
|
|
<ClCompile Include="src\oamd\oamd_params.cpp" />
|
|
<ClCompile Include="src\oamd\oamd_parser.cpp" />
|
|
<ClCompile Include="src\speaker\speaker_layout_lookup.cpp" />
|
|
<ClCompile Include="src\speaker\speaker_step.cpp" />
|
|
<ClCompile Include="src\speaker\speaker_trim.cpp" />
|
|
<ClCompile Include="src\stream\stream.cpp" />
|
|
<ClCompile Include="src\task\task.cpp" />
|
|
<ClCompile Include="src\telemetry\event_bus.cpp" />
|
|
<ClCompile Include="src\timeline\position_timeline.cpp" />
|
|
<!-- Public C API (the dll only upstream; JOC_STATIC makes it a plain lib). -->
|
|
<ClCompile Include="src\api\joc_api.cpp" />
|
|
<ClCompile Include="src\api\joc_stream_api.cpp" />
|
|
<ClCompile Include="src\api\joc_task_api.cpp" />
|
|
<!-- Dispatcher baseline: compiled for the target's own ISA, no /arch. -->
|
|
<ClCompile Include="src\simd\cpu_probe.cpp" />
|
|
<ClCompile Include="src\simd\dispatch.cpp" />
|
|
<ClCompile Include="src\simd\kernels_scalar.cpp" />
|
|
<!--
|
|
The CLI frontend. Upstream builds it into joc_cli.exe out of the same
|
|
sources; it is part of the copy, it needs nothing but the library API, and
|
|
a static library keeps it inert (its main() is never referenced, so the
|
|
linker never pulls the object in) while the copy stays complete.
|
|
-->
|
|
<ClCompile Include="src\cli\joc_cli.cpp" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(Platform)'=='x64'">
|
|
<ClCompile Include="src\simd\kernels_intrin_avx2.cpp">
|
|
<AdditionalOptions>/arch:AVX2 %(AdditionalOptions)</AdditionalOptions>
|
|
</ClCompile>
|
|
<ClCompile Include="src\simd\kernels_intrin_avx512.cpp">
|
|
<AdditionalOptions>/arch:AVX512 %(AdditionalOptions)</AdditionalOptions>
|
|
</ClCompile>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(Platform)'=='Win32'">
|
|
<ClCompile Include="src\simd\kernels_intrin_avx2.cpp">
|
|
<AdditionalOptions>/arch:AVX2 %(AdditionalOptions)</AdditionalOptions>
|
|
</ClCompile>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ClInclude Include="include\eac3joc_core.h" />
|
|
<ClInclude Include="include\joc_core.h" />
|
|
<ClInclude Include="include\joc_stream.h" />
|
|
<ClInclude Include="include\joc_version.h" />
|
|
<ClInclude Include="src\adm\adm_metadata.h" />
|
|
<ClInclude Include="src\adm\adm_tracks.h" />
|
|
<ClInclude Include="src\binaural\jochrtf_runtime.h" />
|
|
<ClInclude Include="src\eac3_transport\eac3_reader.h" />
|
|
<ClInclude Include="src\emdf\emdf_parser.h" />
|
|
<ClInclude Include="src\foundation\bit_reader.h" />
|
|
<ClInclude Include="src\foundation\fft.h" />
|
|
<ClInclude Include="src\foundation\fs_utf8.h" />
|
|
<ClInclude Include="src\foundation\geometry.h" />
|
|
<ClInclude Include="src\foundation\metadata_timing.h" />
|
|
<ClInclude Include="src\foundation\mini_json.h" />
|
|
<ClInclude Include="src\foundation\py_num.h" />
|
|
<ClInclude Include="src\foundation\sha256.h" />
|
|
<ClInclude Include="src\foundation\status.h" />
|
|
<ClInclude Include="src\hrtf\jochrtf.h" />
|
|
<ClInclude Include="src\hrtf\public_filterbank.h" />
|
|
<ClInclude Include="src\hrtf\rosella_bank.h" />
|
|
<ClInclude Include="src\hrtf\rosella_filterbank.h" />
|
|
<ClInclude Include="src\hrtf\rosella_filterbank_tables.h" />
|
|
<ClInclude Include="src\hrtf\rosella_model.h" />
|
|
<ClInclude Include="src\hrtf\rosella_renderer.h" />
|
|
<ClInclude Include="src\io\adm_writer.h" />
|
|
<ClInclude Include="src\io\hdf5.h" />
|
|
<ClInclude Include="src\io\inflate.h" />
|
|
<ClInclude Include="src\io\npy.h" />
|
|
<ClInclude Include="src\io\npy_writer.h" />
|
|
<ClInclude Include="src\io\process.h" />
|
|
<ClInclude Include="src\io\wav_writer.h" />
|
|
<ClInclude Include="src\io\zip_reader.h" />
|
|
<ClInclude Include="src\joc_bitstream\bed_layout_map.h" />
|
|
<ClInclude Include="src\joc_bitstream\joc_huffman_tables.h" />
|
|
<ClInclude Include="src\joc_bitstream\joc_parser.h" />
|
|
<ClInclude Include="src\joc_core\objects16.h" />
|
|
<ClInclude Include="src\joc_core\qmf_tables.h" />
|
|
<ClInclude Include="src\oamd\isf_tables.h" />
|
|
<ClInclude Include="src\oamd\oamd_math.h" />
|
|
<ClInclude Include="src\oamd\oamd_params.h" />
|
|
<ClInclude Include="src\oamd\oamd_parser.h" />
|
|
<ClInclude Include="src\simd\cpu_probe.h" />
|
|
<ClInclude Include="src\simd\simd.h" />
|
|
<!-- src\simd\kernels_intrin_neon.cpp is excluded on every platform; see above. -->
|
|
<ClInclude Include="src\speaker\speaker_layout_lookup.h" />
|
|
<ClInclude Include="src\speaker\speaker_trim.h" />
|
|
<ClInclude Include="src\speaker\speaker_layouts.h" />
|
|
<ClInclude Include="src\speaker\speaker_step.h" />
|
|
<ClInclude Include="src\speaker\speaker_meta.h" />
|
|
<ClInclude Include="src\stream\stream.h" />
|
|
<ClInclude Include="src\task\task.h" />
|
|
<ClInclude Include="src\telemetry\event_bus.h" />
|
|
<ClInclude Include="src\timeline\position_timeline.h" />
|
|
</ItemGroup>
|
|
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
<ImportGroup Label="ExtensionTargets" />
|
|
</Project>
|