Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/p1-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
-DBUILD_TESTING=ON
-DJUCE_WEBVIEW2_PACKAGE_LOCATION="${{ github.workspace }}/.deps"
- name: Build executable and native RT tests
run: cmake --build build --config Release --target ARMixConsole ARMixFxOrderTests ARMixMixerRoutingTests ARMixChannelRoutingContractTests ARMixChannelSendTests ARMixPreparedMixerBlockTests ARMixLiveRoutingEpochTests ARMixJucePortMaskTests ARMixNativeMixerSessionTests ARMixNativeDrySendTests ARMixLiveChannelFxTests ARMixTenChannelLiveControlTests ARMixWorkspaceTests ARMixVaultTests ARMixBackupTests ARMixOrbitPhaseTests ARMixOrbitControlTests ARMixOrbitMotionTests ARMixOrbitDistanceTests ARMixFxBypassEnvelopeTests ARMixDearVrPolarPolicyTests ARMixRTTests ARMixPresetTests ARMixDiagnosticTests ARMixClockBridgeTests ARMixVirtualClockSoakTests ARMixCadenceTests ARMixCrackleWindowTests ARMixHealthTests ARMixPolicyTests ARMixPeriodEvidenceTests ARMixLifecycleTests ARMixWasapiProbeTests ARMixDualJuceTests ARMixClockSizingTests ARMixIndependentFormatTests ARMixRecoveryTests ARMixStreamWatchdogTests ARMixBridgeContinuityTests ARMixEndpointPolicyTests ARMixEndpointGuardTests ARMixAsioPolicyTests ARMixAsioBackendTests ARMixAsioRegistryIdentityTests ARMixDirectFenceTests --parallel 2
run: cmake --build build --config Release --target ARMixConsole ARMixFxOrderTests ARMixMixerRoutingTests ARMixChannelRoutingContractTests ARMixChannelSendTests ARMixPreparedMixerBlockTests ARMixLiveRoutingEpochTests ARMixJucePortMaskTests ARMixNativeMixerSessionTests ARMixNativeDrySendTests ARMixLiveChannelFxTests ARMixTenChannelLiveControlTests ARMixWorkspaceTests ARMixVaultTests ARMixBackupTests ARMixOrbitPhaseTests ARMixOrbitControlTests ARMixOrbitMotionTests ARMixOrbitDistanceTests ARMixFxBypassEnvelopeTests ARMixDearVrPolarPolicyTests ARMixRTTests ARMixPresetTests ARMixShowSchemaTests ARMixDiagnosticTests ARMixClockBridgeTests ARMixVirtualClockSoakTests ARMixCadenceTests ARMixCrackleWindowTests ARMixHealthTests ARMixPolicyTests ARMixPeriodEvidenceTests ARMixLifecycleTests ARMixWasapiProbeTests ARMixDualJuceTests ARMixClockSizingTests ARMixIndependentFormatTests ARMixRecoveryTests ARMixStreamWatchdogTests ARMixBridgeContinuityTests ARMixEndpointPolicyTests ARMixEndpointGuardTests ARMixAsioPolicyTests ARMixAsioBackendTests ARMixAsioRegistryIdentityTests ARMixDirectFenceTests --parallel 2
- name: Test realtime control primitives
run: ctest --test-dir build -C Release --output-on-failure
- name: Package verified JUCE GUI for hardware FAT
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ juce_add_gui_app(ARMixConsole
juce_add_binary_data(ARMixAssets SOURCES
web/index.html web/styles.css web/app.js web/bridge.js web/monitor.js)

target_sources(ARMixConsole PRIVATE src/Main.cpp src/LiveAudioEngine.h src/VstOrbitController.h engine/core/MixerRoutingPlan.h engine/core/ChannelRoutingContract.h engine/core/ChannelSendPlan.h engine/core/PreparedMixerBlock.h engine/core/LiveChannelFxGraph.h engine/core/PreparedNativeMixerSession.h engine/core/NativeDryRouteCommand.h engine/core/RealtimeRoutePublisher.h engine/device/LiveInputPortRegistry.h src/LiveDryRoutingLab.h engine/core/OrbitPhase.h engine/core/OrbitControlPolicy.h engine/core/OrbitMotion.h engine/core/OrbitDistanceMapping.h engine/core/DearVrPolarPolicy.h src/PluginCatalog.h src/PluginVault.h src/PortableWorkspace.h src/StudioBackup.h src/DiagnosticsRecorder.h src/StereoPan.h src/NativePresetArchive.h src/VstBusLayout.h src/LiveGraphHandoff.h src/DiagnosticTone.h engine/core/RealtimeHealthHistogram.h engine/core/CallbackCadenceEvidence.h engine/diagnostics/CrackleEvidenceWindow.h engine/device/AdaptiveClockBridge.h engine/device/AudioProfilePolicy.h engine/device/PeriodCapabilityEvidence.h engine/device/SessionLifecycle.h engine/device/WasapiCapabilityProbe.h engine/device/JuceIndependentClockDevice.h engine/device/ClockBridgeSizing.h engine/device/IndependentStreamFormatFence.h engine/device/DirectRestoreBackoff.h engine/device/IndependentStreamWatchdog.h engine/device/BridgeContinuityGate.h engine/device/EndpointIdentityPolicy.h engine/device/WasapiEndpointIdentityGuard.h engine/device/AsioStartupPolicy.h engine/device/AsioPriorityDeviceManager.h engine/device/JuceActivePortSnapshot.h engine/device/AsioRegistrationPolicy.h engine/device/AsioRegistryIdentityProbe.h engine/device/DirectRouteFence.h)
target_sources(ARMixConsole PRIVATE src/Main.cpp src/LiveAudioEngine.h src/VstOrbitController.h engine/core/MixerRoutingPlan.h engine/core/ChannelRoutingContract.h engine/core/ChannelSendPlan.h engine/core/PreparedMixerBlock.h engine/core/LiveChannelFxGraph.h engine/core/PreparedNativeMixerSession.h engine/core/NativeDryRouteCommand.h engine/core/RealtimeRoutePublisher.h engine/device/LiveInputPortRegistry.h src/LiveDryRoutingLab.h engine/core/OrbitPhase.h engine/core/OrbitControlPolicy.h engine/core/OrbitMotion.h engine/core/OrbitDistanceMapping.h engine/core/DearVrPolarPolicy.h src/PluginCatalog.h src/PluginVault.h src/PortableWorkspace.h src/StudioBackup.h src/DiagnosticsRecorder.h src/StereoPan.h src/NativePresetArchive.h src/NativeShowSchema.h src/VstBusLayout.h src/LiveGraphHandoff.h src/DiagnosticTone.h engine/core/RealtimeHealthHistogram.h engine/core/CallbackCadenceEvidence.h engine/diagnostics/CrackleEvidenceWindow.h engine/device/AdaptiveClockBridge.h engine/device/AudioProfilePolicy.h engine/device/PeriodCapabilityEvidence.h engine/device/SessionLifecycle.h engine/device/WasapiCapabilityProbe.h engine/device/JuceIndependentClockDevice.h engine/device/ClockBridgeSizing.h engine/device/IndependentStreamFormatFence.h engine/device/DirectRestoreBackoff.h engine/device/IndependentStreamWatchdog.h engine/device/BridgeContinuityGate.h engine/device/EndpointIdentityPolicy.h engine/device/WasapiEndpointIdentityGuard.h engine/device/AsioStartupPolicy.h engine/device/AsioPriorityDeviceManager.h engine/device/JuceActivePortSnapshot.h engine/device/AsioRegistrationPolicy.h engine/device/AsioRegistryIdentityProbe.h engine/device/DirectRouteFence.h)
target_compile_definitions(ARMixConsole PRIVATE
JUCE_WEB_BROWSER=1
JUCE_USE_WIN_WEBVIEW2=1
Expand Down Expand Up @@ -214,4 +214,10 @@ if(BUILD_TESTING)
juce::juce_recommended_config_flags)
target_compile_features(ARMixPresetTests PRIVATE cxx_std_20)
add_test(NAME NativePresetZipRoundTrip COMMAND ARMixPresetTests)
juce_add_console_app(ARMixShowSchemaTests PRODUCT_NAME "ArSonMix Show V2 Wire Schema Tests")
target_sources(ARMixShowSchemaTests PRIVATE tests/native_show_schema_test.cpp src/NativeShowSchema.h)
target_link_libraries(ARMixShowSchemaTests PRIVATE juce::juce_core juce::juce_recommended_config_flags)
target_compile_features(ARMixShowSchemaTests PRIVATE cxx_std_20)
add_test(NAME P4NativeShowSnapshotV2WireRoundTrip COMMAND ARMixShowSchemaTests)

endif()
24 changes: 24 additions & 0 deletions docs/P4_NATIVE_SHOW_V2_SCHEMA_STAGE1_20261029.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# P4 stage 1 — Native ShowV2 / SnapshotV2 schema contract (2026-10-29)

## Why this is a separate PR
P1J in main now preserves actual running channel VST3 instances across safe route edits, but its accepted route/session is volatile. The left rail's localStorage snapshots are **UI-only** and cannot restore a real 10-channel performance. The first production-safe step is a strict native serialized data contract which cannot accidentally open a different sound device or touch the realtime callback.

## Delivered by this stage
- `src/NativeShowSchema.h`: two native JSON document kinds, `arsonmix.native.show` and `arsonmix.native.snapshot`, with explicit `schemaVersion=2`, stable UUIDs, bounded names and monotonic positive millisecond timestamps.
- Show metadata stores an ordered bounded list of snapshot UUIDs, current snapshot ID and exactly ten **stable indexed** channel recall-safe flags. Actual snapshots are separate documents, not unbounded nested arrays.
- Snapshot stores **exactly ten** source/physical-port mappings (disconnected/mono/stereo), linear fader and PAN, MUTE/SOLO and to-MASTER, PRE/POST sends (32 total max), ordered per-channel FX references (eight max each), catalog ID, VST UID, SHA256 blob digest and bypass, plus MASTER gain/PAN/MUTE/MONO.
- A plugin state *digest/reference* is not a vendor VST3 state capture. It must point to a verified immutable binary blob created by a later storage stage. This stage does not serialize Orbit automation, HPF, channel trim, full multi-FX bus layouts, external sample libraries or output device driver settings. Those capabilities must be versioned and implemented before a full-scene claim.
- `Codec::decode` rejects malformed, oversized, unsafe or out-of-range documents, duplicate UUIDs, invalid references and unsafe topology basics without changing an already accepted output object. Physical port indexes are data **only**: they are never automatically activated on another PC. Cycle detection and device/plugin compatibility remain mandatory native routing preflight before eventual recall.

## Runtime and testing boundary
- Serialization is control-only. The production mixer callback, FX graph, Orbit, GUI CSS, master meter, portable vault, dialog and WebView2 code are **unchanged**.
- `tests/native_show_schema_test.cpp` exercises round-trip JSON, ten real indexed source records, sparse stereo pins, PRE sends, FX digest references, channel safes, unknown schema, duplicate snapshot UUIDs, invalid names, invalid plugin/port/pan/send and failure atomicity. The existing canonical Windows MSVC + CTest workflow builds this new test; it does not spawn another CI pipeline.
- There is no save-to-disk/backup integration and **no native recall** in stage 1. Neither green CI nor a Windows artifact means physical audio was tested or that issue #15 is closed.

## Next PRs (separate gates)
1. **P4 stage 2**: portable Studio/Shows transactional storage + immutable blob checksum verification + recovery journal, budgeted file/entry limits, and verified backup inclusion. Capture actual accepted P1J route and real vendor getState on compliant control/affinity thread; identify unsupported capabilities, never fabricate them.
2. **P4 stage 3**: read-only native show/snapshot metadata via WebView2 ACK, migrate UI-only localStorage as explicitly *legacy UI* (no fake plugin states).
3. **P4 stage 4**: full prepare/validate/ACK-gated recall, device-epoch/port remap fence, per-channel safes/undo, controlled output mute/de-click and transaction rollback. Avoid disk, JSON and plugin vendor lifecycle in RT.
4. Windows 100/125/150/175% first-open Audio Setup DPI and actual ASIO/WASAPI #15 physical FAT remain independent release gates.

Do not merge historical PR #128 wholesale; keep the P0 #129 gray/green toolbar, lightweight pointer skin and approved 10CH+MASTER layout.
Loading
Loading