Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a1a3bc5
fix(startup): admit real silent ChannelId mixer with zero hardware in…
masarray Nov 9, 2026
fda9ef5
fix(native): preserve unpatched M4 contract, safely admit silent star…
masarray Nov 9, 2026
75e99c6
test(P0): prove output-only native silent mixer can add track and ren…
masarray Nov 9, 2026
178631b
test(device): update DIRECT fingerprint contract for genuine output-o…
masarray Nov 9, 2026
16a8599
fix(P0): make Audio I/O output-only selection work end-to-end
masarray Nov 9, 2026
b0f485b
test(P0): Chromium verify output-only Audio I/O, Apply/ACK and no aut…
masarray Nov 9, 2026
ce326e1
fix(recovery): preserve genuine zero-capture WASAPI mixer across veri…
masarray Nov 9, 2026
94885d7
fix(FX): never gate compiled-in EQ, Compressor or Harmony on external…
masarray Nov 9, 2026
9b128a5
fix(FX picker): show genuine native EQ, Compressor and Harmony before…
masarray Nov 9, 2026
0389e7f
test(UI): ensure built-in native FX are already in cold-start picker …
masarray Nov 9, 2026
df15d63
test(P0): reconcile native FX catalog contract with built-in processo…
masarray Nov 9, 2026
6f1338e
fix(P0): restore durable .smix over pristine native SOURCE NONE start…
masarray Nov 9, 2026
9f1b5b5
fix(recovery): permit verified previous checkpoint to replace untouch…
masarray Nov 9, 2026
36a9bcc
test(recovery): verified previous .smix can replace pristine starter …
masarray Nov 9, 2026
b9b64f7
Fix native zero-capture admission and reduce Audio I/O reopen stalls
masarray Nov 9, 2026
c9563d1
Allow explicit MAIN pin recovery without replacing the mixer session
masarray Nov 9, 2026
29f29ac
Recover ASIO4ALL mixer bindings by verified physical pin labels
masarray Nov 9, 2026
6285f80
Validate ASIO recovery in the complete Windows contract suite
masarray Nov 9, 2026
5a923a7
Keep ASIO4ALL mixer and FX live when capture disappears
masarray Nov 9, 2026
6177068
fix(asio4all): recover unique physical MAIN from mixed WDM pins and r…
masarray Nov 9, 2026
cbcc52d
fix(asio4all): preserve MAIN intent and retry transient automatic ARM…
masarray Nov 9, 2026
0d2f1ba
fix(asio4all): separate driver reopen budget from native mixer rebind…
masarray Nov 9, 2026
a5c737d
test(asio4all): enforce scheduler assertions in Release CTest
masarray Nov 9, 2026
01fcd09
fix(asio4all): reopen missing JUCE device only through pinned selecte…
masarray Nov 9, 2026
9833045
ci(asio4all): run focused missing-device and restart contracts before…
masarray Nov 9, 2026
681c4a1
merge(main): reconcile ArSon Player virtual PCM with ASIO4ALL native …
masarray Nov 9, 2026
3015960
fix(session): retain PlayerDeck music through ASIO4ALL 0-IN and .smix…
masarray Nov 9, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/p1-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ jobs:
node scripts/check_console_puzzle.mjs
node --check web/approved-native-bridge.js
node --check web/approved-native-contract.js
node --test --test-name-pattern="ASIO4ALL|ASIO restart" tests/mixer_io_operator_contract_test.mjs
node --test tests/workstream_coordination_contract.test.mjs tests/ci_workflow_efficiency_test.mjs tests/chat_ci_dispatch_contract.test.mjs tests/approved_native_m2_contract.test.cjs tests/native_artifact_packaging_contract_test.mjs tests/windows_installer_contract_test.mjs tests/live_graph_contract_test.mjs
python -m unittest discover -s tests -p approved_native_gui_bundle_test.py -v
python -m unittest discover -s scripts/tests -p test_factoryfx_release_bundle.py -v
Expand Down
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,22 @@ target_sources(ARMixConsole PRIVATE src/Main.cpp src/LiveAudioEngine.h engine/bu
if(MSVC)
target_compile_options(ARMixConsole PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:/utf-8>")
endif()
# Stamp the build source in Copy Audio Report, including Windows field trials.
execute_process(COMMAND git rev-parse --verify HEAD
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
OUTPUT_VARIABLE ARMIX_BUILD_SOURCE_SHA OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE ARMIX_BUILD_SOURCE_STATUS ERROR_QUIET)
if(NOT ARMIX_BUILD_SOURCE_STATUS EQUAL 0 OR NOT ARMIX_BUILD_SOURCE_SHA MATCHES "^[0-9a-f]+$")
set(ARMIX_BUILD_SOURCE_SHA "unavailable")
endif()
# One JUCE mixer/PCM host on all three desktops. Device backends are OS owned.
target_compile_definitions(ARMixConsole PRIVATE
JUCE_WEB_BROWSER=1
JUCE_USE_CURL=0
JUCE_PLUGINHOST_VST3=1
JUCE_APPLICATION_NAME_STRING="AR MIX Studio"
JUCE_APPLICATION_VERSION_STRING="0.5.0-p2")
JUCE_APPLICATION_VERSION_STRING="0.5.0-p2"
ARMIX_BUILD_SOURCE_SHA="${ARMIX_BUILD_SOURCE_SHA}")
if(WIN32)
# Windows retains its proven ASIO-first / WASAPI / static WebView2 distribution.
# Never link Windows loader or sound APIs into macOS/Linux builds.
Expand Down Expand Up @@ -263,6 +272,10 @@ if(BUILD_TESTING)
add_executable(ARMixStreamWatchdogTests tests/independent_stream_watchdog_test.cpp)
target_compile_features(ARMixStreamWatchdogTests PRIVATE cxx_std_20)
add_test(NAME IndependentStreamSilenceRecovery COMMAND ARMixStreamWatchdogTests)
add_executable(ARMixAsioRestartGateTests tests/asio_restart_recovery_gate_test.cpp
engine/device/AsioRestartRecoveryGate.h)
target_compile_features(ARMixAsioRestartGateTests PRIVATE cxx_std_20)
add_test(NAME Asio4AllWdmSettleBoundedDriverTransactionsAndDeferredRebind COMMAND ARMixAsioRestartGateTests)
add_executable(ARMixRecoveryTests tests/direct_restore_backoff_test.cpp)
target_compile_features(ARMixRecoveryTests PRIVATE cxx_std_20)
add_test(NAME BoundedDirectDeviceRecovery COMMAND ARMixRecoveryTests)
Expand Down
68 changes: 68 additions & 0 deletions engine/device/AsioRestartRecoveryGate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// SPDX-License-Identifier: AGPL-3.0-only
#pragma once
#include <cstdint>
#include <limits>

namespace armix::device {
// CONTROL-thread scheduler for an ASIO4ALL driver whose WDM pin inventory
// may be transient during a control-panel restart. It never opens a device,
// touches a vendor plugin, or enters the realtime PCM callback.
// Only actual driver reopen/correction calls consume the bounded budget;
// readback and native graph publication remain eligible after it is spent.
class AsioRestartRecoveryGate final {
public:
static constexpr unsigned maxDriverTransactions=3;
static constexpr std::uint64_t settleMs=350;

void observeEpoch(std::uint64_t epoch,std::uint64_t nowMs) noexcept {
if(epoch==0 || epoch==epoch_)return;
epoch_=epoch;
driverTransactions_=0;
bindFailures_=0;
nextMs_=add(nowMs,settleMs);
}
// A restart caused by *our own* verified reopen/correction is not a new
// opportunity for an unlimited series of expensive vendor calls.
void carryInternalEpoch(std::uint64_t epoch) noexcept {
if(epoch!=0)epoch_=epoch;
}
bool due(std::uint64_t nowMs) const noexcept {
return epoch_!=0 && nowMs>=nextMs_;
}
bool mayChangeDriver() const noexcept {
return driverTransactions_<maxDriverTransactions;
}
void waitForReadback(std::uint64_t nowMs) noexcept {
defer(nowMs,750);
}
void driverTransaction(std::uint64_t nowMs) noexcept {
if(driverTransactions_<maxDriverTransactions)++driverTransactions_;
defer(nowMs,driverTransactions_==1?1200:driverTransactions_==2?4000:8000);
}
void bindFailed(std::uint64_t nowMs) noexcept {
if(bindFailures_<6)++bindFailures_;
// Rebind is not a vendor reopen: keep retrying at low frequency so a
// transient not-ready graph can recover without a manual REMAP.
const std::uint64_t pause=1200ull<<(bindFailures_-1);
defer(nowMs,pause>30000?30000:pause);
}
void recovered() noexcept {
driverTransactions_=0;
bindFailures_=0;
nextMs_=0;
}
unsigned driverTransactions() const noexcept {return driverTransactions_;}
std::uint64_t trackedEpoch() const noexcept {return epoch_;}
private:
static std::uint64_t add(std::uint64_t a,std::uint64_t b) noexcept {
return a>std::numeric_limits<std::uint64_t>::max()-b?
std::numeric_limits<std::uint64_t>::max():a+b;
}
void defer(std::uint64_t nowMs,std::uint64_t millis) noexcept {
const auto deadline=add(nowMs,millis);
if(deadline>nextMs_)nextMs_=deadline;
}
std::uint64_t epoch_=0,nextMs_=0;
unsigned driverTransactions_=0,bindFailures_=0;
};
} // namespace armix::device
11 changes: 7 additions & 4 deletions engine/device/DirectRouteFence.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ class DirectRouteFence final
std::string_view inputMask,
std::string_view outputMask) noexcept
{
if (type.empty() || device.empty() || !validMask(inputMask)
|| !validMask(outputMask)) return 0;
// Zero capture pins are permitted ONLY for the input side of an
// output-only session. The playback mask must identify real pins.
if (type.empty() || device.empty() || !validMask(inputMask,true)
|| !validMask(outputMask,false)) return 0;
std::uint64_t hash=14695981039346656037ull;
append(hash, type);
append(hash, device);
Expand All @@ -102,9 +104,10 @@ class DirectRouteFence final
return hash ? hash : 1; // reserve zero for never-approved
}
private:
static bool validMask(std::string_view mask) noexcept
static bool validMask(std::string_view mask,bool allowZero) noexcept
{
if (mask.empty() || mask.front() == '0') return false;
if (mask.empty() || (mask.front() == '0' &&
!(allowZero && mask.size() == 1))) return false;
for (const unsigned char c : mask)
if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')))
return false;
Expand Down
5 changes: 2 additions & 3 deletions engine/device/JuceActivePortSnapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ struct JuceActivePortSnapshot final {
std::uint64_t epoch=0;
juce::String deviceName, typeName;

// Accept a frozen copy of masks so unit tests can exercise sparse
// numbering without requiring an ASIO device. This executes off RT.
// Accept a frozen copy of masks to exercise sparse numbering and real
// output-only devices with zero capture pins. No fake input is created.
static bool fromMasks(std::uint64_t epoch,
const juce::BigInteger& inputMask,
const juce::BigInteger& outputMask,
Expand All @@ -46,7 +46,6 @@ struct JuceActivePortSnapshot final {
if(p>=limit || out>=limit){error=Fault::tooManyOutputs;return false;}
outputIndices[out++]=p;
}
if(in==0){error=Fault::emptyInput;return false;}
if(out==0){error=Fault::emptyOutput;return false;}
JuceActivePortSnapshot candidate;
LiveInputPortRegistry::Fault inputFault{};
Expand Down
4 changes: 2 additions & 2 deletions integration/ApprovedNativeRuntimeSnapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ inline bool publishVerifiedFirstSoundState(juce::var& snapshot,
static_cast<juce::int64>(routeEpoch)>0 &&
static_cast<juce::int64>(revision)>0 &&
juce::String(static_cast<juce::int64>(routeEpoch))==epoch.toString() &&
inputs.isArray() && !inputs.getArray()->isEmpty() &&
inputs.isArray() &&
outputs.isArray() && outputs.getArray()->size()>=2 &&
nativeV8Number(device.getProperty("sampleRate",{}),rate) &&
nativeV8Number(device.getProperty("bufferFrames",{}),frames) &&
Expand Down Expand Up @@ -267,7 +267,7 @@ inline bool projectInstalledNativeChannelIdGraph(
const auto frames=device.getProperty("bufferFrames",{});
double actualRate=0.,actualFrames=0.;
if (!outputMask.isArray() || !inputMask.isArray() ||
outputMask.getArray()->size()<2 || inputMask.getArray()->isEmpty() ||
outputMask.getArray()->size()<2 ||
!nativeV8Number(rate,actualRate) ||
!nativeV8Number(frames,actualFrames) ||
actualRate<8000. || actualRate>384000. ||
Expand Down
11 changes: 9 additions & 2 deletions scripts/build_approved_native_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ def accepted_pages_html() -> str:
# HTML at native build time. Every anchor must occur exactly once: no silent
# breakage if Pages GUI source evolves. No extra layout or simulated PCM.
NATIVE_EVENT_HOOKS = (
# Do not expose the reference mixer while the native host is still starting.
("</head>", "<style id=\"native-mixer-startup\">"
"html:not([data-armix-native-roster]) :is(.console-pane,#trackCount){visibility:hidden}"
"</style>\n</head>"),
("Mixer · Reference Session", "Mixer · Native Session"),
("Interactive visual reference. Changes are local to this mockup.", "Preparing native mixer…"),
("SIMULATED METERS · NO REAL AUDIO", "NATIVE AUDIO"),
# The published /preview/ HTML and its V28 checkpoint are immutable.
# Change ONLY the compiled native WebView's operator fader travel law.
# The DSP gain remains exact dB -> 10^(dB/20), and the mapping is
Expand Down Expand Up @@ -228,10 +235,10 @@ def accepted_pages_html() -> str:
" setNativeCatalog(rows){\n"
" pluginCatalog=rows.filter(x=>x&&typeof x.id==='string'&&typeof x.name==='string').map(x=>({\n"
" id:x.id,name:x.name,vendor:x.vendor||'Unknown',category:x.category||'Utility',\n"
" format:'VST3',status:'ready',latencySamples:null,\n"
" format:x.format==='Native'?'Native':'VST3',status:'ready',latencySamples:null,\n"
" favorite:!!x.favorite,hidden:false}));\n"
" const label=document.querySelector('.plugin-disclaimer');\n"
" if(label)label.textContent='NATIVE JUCE VST3 · only verified scanned catalog entries are insertable';\n"
" if(label)label.textContent='Native EQ/Compressor/Harmony ready · external VST3 require verified scan';\n"
" renderPluginCatalog();renderFastPicker();return pluginCatalog.length;\n"
" },\n"
" closeNativePicker(){setFastPicker(false);},\n"
Expand Down
3 changes: 2 additions & 1 deletion src/DiagnosticTone.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace armix::diagnostics
{
// Diagnostic routes are temporary, never persisted as the chosen user device.
enum class Route : int { normal = 0, dryThrough = 1, outputOnlyTone = 2, captureOnly = 3 };
enum class Route : int { normal = 0, dryThrough = 1, outputOnlyTone = 2, captureOnly = 3, mainOutputTone = 4 };

inline constexpr const char* routeName (Route route) noexcept
{
Expand All @@ -17,6 +17,7 @@ inline constexpr const char* routeName (Route route) noexcept
case Route::dryThrough: return "DRY_THROUGH";
case Route::outputOnlyTone: return "OUTPUT_ONLY_TONE";
case Route::captureOnly: return "CAPTURE_ONLY";
case Route::mainOutputTone: return "MAIN_OUTPUT_TONE";
}
return "INVALID";
}
Expand Down
Loading
Loading