Skip to content
Closed
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
7 changes: 6 additions & 1 deletion .github/workflows/ui-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
node --check web/plugin-ui.js
node --check web/mixer-io.js
node --check web/mixer-layout.js
node --test tests/workstream_coordination_contract.test.mjs tests/gui_workflow_contract_test.mjs tests/plugin_ui_contract_test.mjs tests/ci_workflow_efficiency_test.mjs tests/fx_drag_reorder_contract_test.mjs tests/mixer_io_operator_contract_test.mjs tests/mixer_shell_contract_test.mjs tests/approved_native_m2_contract.test.cjs
node --test tests/workstream_coordination_contract.test.mjs tests/gui_workflow_contract_test.mjs tests/plugin_ui_contract_test.mjs tests/ci_workflow_efficiency_test.mjs tests/fx_drag_reorder_contract_test.mjs tests/mixer_io_operator_contract_test.mjs tests/mixer_shell_contract_test.mjs tests/approved_native_m2_contract.test.cjs tests/p1_stream_wire_fx_contract.test.cjs
- name: Validate approved GUI checkpoint and single publisher
run: python tests/gui_baseline_lock_test.py
- name: CSS V28 zero-regression source-order recovery (every GUI CI run)
Expand All @@ -166,6 +166,10 @@ jobs:
run: python tests/approved_native_meter_dirty_stage_b_smoke.py
- name: Verify Stage C shipped CSS versus original-source computed and screenshot parity
run: python tests/approved_stage_c_css_visual_parity_smoke.py
- name: Check real mobile /preview/ touch toolbar, popup and stray chevrons
run: python tests/approved_preview_mobile_navigation_smoke.py
- name: FX rack master bypass preserves each insert state (real Chromium)
run: python tests/approved_fx_rack_master_power_smoke.py
- name: Stage D one runtime CSSOM and actual stylesheet network count
run: python tests/approved_css_stage_d_single_bundle_smoke.py
- name: Stage C rendered CSS parity (original vs compiled, three viewports + hover)
Expand Down Expand Up @@ -448,5 +452,6 @@ jobs:
pages-v54-*.png
pages-v55-*.png
pages-v28-physical-console-owner-v59-*.png
pages-mobile-*.png
if-no-files-found: ignore
retention-days: 3
30 changes: 28 additions & 2 deletions engine/core/DynamicChannelFxLeaseBank.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <array>
#include <cmath>
#include <cstdint>
#include <atomic>
#include <memory>
#include <span>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -33,6 +35,9 @@ class DynamicChannelFxLeaseBank final {
ChannelId id{};
ProcessingFormat format=ProcessingFormat::stereo;
std::vector<Lease> inserts; // CONTROL only; no creation on callback
// Reused over revision changes. This flag overrides the effective
// output without changing the individual FxInstance bypass flags.
std::shared_ptr<std::atomic<bool>> rackBypassed;
};

// Occupied CH1 vendor/Orbit owner remains alive with accepted PCM.
Expand Down Expand Up @@ -101,6 +106,8 @@ class DynamicChannelFxLeaseBank final {
if(b.format!=ProcessingFormat::mono &&
b.format!=ProcessingFormat::stereo)return Fault::invalidBusLayout;
Row row;row.id=b.id;row.format=b.format;
row.rackBypassed=b.rackBypassed?b.rackBypassed:
std::make_shared<std::atomic<bool>>(false); // CONTROL allocation
row.count=static_cast<std::uint8_t>(b.inserts.size());
for(std::size_t i=0;i<b.inserts.size();++i) {
const auto& owner=b.inserts[i];
Expand Down Expand Up @@ -174,6 +181,21 @@ class DynamicChannelFxLeaseBank final {
(*owner)->bypassRequested.store(bypass,std::memory_order_release);
return true;
}
bool setRackBypass(std::uint64_t expectedEpoch,
std::uint64_t expectedRevision,ChannelId id,
bool bypass) const noexcept {
if(expectedEpoch!=epoch_||expectedRevision!=revision_||!id.value)
return false;
const auto* row=find(id);
if(!row||!row->rackBypassed)return false;
row->rackBypassed->store(bypass,std::memory_order_release);
return true;
}
bool rackBypassed(ChannelId id) const noexcept {
const auto* row=find(id);
return row&&row->rackBypassed &&
row->rackBypassed->load(std::memory_order_acquire);
}
// The actual prepared vendor instance is also the native editor owner;
// never synthesize a WebView editor or use a catalog name as identity.
Lease leaseEditor(std::uint64_t expectedEpoch,
Expand All @@ -199,7 +221,7 @@ class DynamicChannelFxLeaseBank final {
retained.reserve(prior.rows_.size());
for(const auto& row:prior.rows_) {
Assignment item;
item.id=row.id;item.format=row.format;
item.id=row.id;item.format=row.format;item.rackBypassed=row.rackBypassed;
item.inserts.reserve(row.count);
for(std::size_t slot=0;slot<row.count;++slot)
item.inserts.push_back(row.owners[slot]);
Expand All @@ -225,6 +247,7 @@ class DynamicChannelFxLeaseBank final {
bool found=false;
for(const auto& row:prior.rows_) {
Assignment a;a.id=row.id;a.format=row.format;
a.rackBypassed=row.rackBypassed;
a.inserts.reserve(row.count+(row.id==target?1:0));
for(std::size_t i=0;i<row.count;++i)a.inserts.push_back(row.owners[i]);
if(row.id==target) {
Expand Down Expand Up @@ -253,15 +276,18 @@ class DynamicChannelFxLeaseBank final {
external_.render(external_.context,left,right,frames);
return; // occupied CH1 is processed exactly once
}
const bool rackOff=row->rackBypassed &&
row->rackBypassed->load(std::memory_order_acquire);
for(std::size_t i=0;i<row->count;++i)
row->raw[i]->render(left,right,frames);
row->raw[i]->render(left,right,frames,rackOff);
}

private:
struct Row final {
ChannelId id{};
ProcessingFormat format=ProcessingFormat::stereo;
std::uint8_t count=0;
std::shared_ptr<std::atomic<bool>> rackBypassed; // persists across revisions
std::array<Lease,maxInserts> owners{};
std::array<FxGraph::FxInstance*,maxInserts> raw{};
};
Expand Down
26 changes: 23 additions & 3 deletions engine/core/LiveChannelFxGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,16 @@ class LiveChannelFxGraph final {
processing.clear(std::memory_order_release);
return ok;
}
void render(float* left,float* right,int samples) noexcept {
void render(float* left,float* right,int samples,bool rackBypassed=false) noexcept {
if(processing.test_and_set(std::memory_order_acquire)) {
contention.fetch_add(1,std::memory_order_relaxed);
juce::FloatVectorOperations::clear(left,samples);
juce::FloatVectorOperations::clear(right,samples);
return;
}
// G5C: atomic request from control; fade and scratch RT-owned.
bypassFade.request(bypassRequested.load(std::memory_order_relaxed));
// Master rack bypass affects the WET/DRY envelope, never the remembered insert preference.
bypassFade.request(rackBypassed || bypassRequested.load(std::memory_order_relaxed));
if(bypassFade.fullyBypassed()) {
processing.clear(std::memory_order_release);
return;
Expand Down Expand Up @@ -227,6 +228,17 @@ class LiveChannelFxGraph final {
fx->bypassRequested.store(bypass,std::memory_order_release);
return true;
}
// One atomic rack override per channel. Individual slot bypass flags stay
// unchanged; ON restores the previous enabled/disabled combination.
bool setRackBypass(int strip,bool bypass) noexcept {
if(strip<0||strip>=fxSlots)return false;
rackBypassed_[strip].store(bypass,std::memory_order_release);
return true;
}
bool rackBypassed(int strip) const noexcept {
return strip>=0&&strip<fxSlots &&
rackBypassed_[strip].load(std::memory_order_acquire);
}
// Same opaque token used by the native BYPASS ACK. A vendor editor takes
// an owner lease ONLY on the message thread, never in process().
InstanceLease leaseInsert(int strip,int position,const juce::String& token) const noexcept {
Expand Down Expand Up @@ -255,6 +267,10 @@ class LiveChannelFxGraph final {
if(!original||original->catalogId!=catalogId)return false;
for(int i=0;i<counts_[strip];++i)
if(processors_[strip][i]==original)return false;
// Reusing the first retained plugin also carries its channel-level
// rack override; no resume-to-ON during a compatible reconfigure.
if(target==0)rackBypassed_[strip].store(
previous.rackBypassed(strip),std::memory_order_relaxed);
processors_[strip][target]=original; // shared_ptr CONTROL only
++counts_[strip];++activeInserts_;
return true;
Expand Down Expand Up @@ -295,12 +311,15 @@ class LiveChannelFxGraph final {
(int strip,float* l,float* r,int samples) noexcept {
if(strip<0||strip>=fxSlots)return;
const int count=counts_[strip]; // immutable, prepared OFF RT
const bool rackOff=rackBypassed_[strip].load(std::memory_order_acquire);
if(count>0) {
for(int slot=0;slot<count;++slot) {
auto* instance=processors_[strip][slot].get();
instance->render(l,r,samples); // no shared_ptr copies or RT heap use
instance->render(l,r,samples,rackOff); // existing 8ms fade; no RT allocation
}
} else if(strip==0 && externalFx)
// The legacy CH1 callback owns its own per-slot smooth rack
// bypass. Never skip it abruptly or strip out its FX tail.
externalFx(externalContext,strip,l,r,samples);
};
if(monitorEnabled_ && (!monitorL||!monitorR))return false;
Expand All @@ -315,6 +334,7 @@ class LiveChannelFxGraph final {
RealtimeStripControls controls_ {};
FxBank processors_ {};
std::array<std::uint8_t,fxSlots> counts_ {};
std::array<std::atomic<bool>,fxSlots> rackBypassed_{}; // CONTROL write; one RT read per lane
int activeInserts_=0;
int pluginQuantum_=512;
int mainOutputLeft_=0,mainOutputRight_=1;
Expand Down
6 changes: 6 additions & 0 deletions engine/core/UnifiedLegacyProductionAdmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ struct UnifiedLegacyAccepted final {
fxOwners->setInsertBypass(epoch,revision,id,slot,
instanceId,bypass);
}
bool setFxRackBypass(const DynamicNativeSessionPublisher& publisher,
std::uint64_t epoch,std::uint64_t revision,
ChannelId id,bool bypass) const noexcept {
return matches(publisher,epoch,revision) &&
fxOwners->setRackBypass(epoch,revision,id,bypass);
}
DynamicChannelFxLeaseBank::Lease leaseFxEditor(
const DynamicNativeSessionPublisher& publisher,
std::uint64_t epoch,std::uint64_t revision,ChannelId id,
Expand Down
Loading
Loading