Review found a blocking bug: the compact header's transportOnly EngineConfigView
and the Settings-sheet EngineConfigView each own independent @State pending
config. reconfigureEngine mutates the engine in place, so the header instance's
.task(id: engine identity) never re-syncs — pressing Start there re-applied its
stale pending values, reverting rate/channel edits made in Settings. In
transportOnly mode, skip the reconfigure and just start the already-configured
engine.
Also: remove the unused isNarrow / horizontalSizeClass (dead code), and honor
showsFilterMenu in PedalPaletteView.horizontalBody (was only gated in vertical).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On narrow widths (iPhone, iPad portrait / split view) the docked desktop layout
overflowed and left the board canvas cramped. Add a size-class-gated compact
layout; regular widths (macOS, wide iPad) are unchanged.
Compact:
- Root drops the always-docked rig sidebar; it opens from a "Rigs" sheet button.
- Header keeps performance controls on screen (title, Start/Stop, Record badge,
Bypass, Mute rig) with a scrollable row of panel toggles.
- Composition panels move to bottom sheets: Pedals (palette + routing),
Settings (sample rate / channel counts / input source), Rigs (library).
- Board mixer, scope, CPU meters, and Tempo/Tuner stay docked above the
full-bleed board canvas.
EngineConfigView gains a transportOnly mode (Start/Stop button only) so the
transport stays in the compact header while the config controls live in the
Settings sheet.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reset now renders as an LED + footswitch like the other transport buttons —
its LED lights whenever there's something to reset (any non-clear state),
driven off a phase didSet.
Add a Pedal.engineDidStop() hook, invoked for every pedal by a new
ShoeGaze.stopEngine() that the user-facing Stop control now calls (transient
stop-around-rebuild sequences still call engine.stop() directly, so pedals
keep state across a restart). LooperPedal overrides it to return to the clear
state, post to LyrebirdMessageCenter, and briefly show "Looper reset — engine
stopped." on its own card via the state indicator.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Engine config edits (In/Out/Rate) now apply to the stopped engine
immediately rather than only at Start, so the input-source picker — which
lists 0..<engine.numInputChannels — updates as soon as the In stepper
changes, letting the user choose the input before starting. No-op while
running (controls are disabled). Reuses the existing onConfigApplied
refresh path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
EngineConfigView seeds its pending In/Out/Rate fields from @State(initialValue:),
which runs only once. After the iOS live-input rebuild swaps in a new engine
with one input channel, the stepper kept showing In: 0 even though audio read
the input. Resync the pending fields in a .task keyed on the engine's object
identity so a rebuilt engine's actual counts are reflected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Live input was silent on macOS because the apps ran under hardened runtime
without the microphone entitlement, so AUHAL input received silent zeros and
the OS never prompted. Fixes:
- Add com.apple.security.device.audio-input entitlement to the macOS Builder
and Demo apps (CODE_SIGN_ENTITLEMENTS wired in both targets).
- Add MicrophonePermission helper (AVCaptureDevice.requestAccess) and gate
live-input selection through it in the Builder view and Demo controller;
deny falls back to the test loop with an explanatory alert.
- Fix ShoeGazeDemo inputChannels 6 -> 1 (built-in mics are mono; 6 made
CoreAudio deliver silence).
Engine-config review fixes:
- installScopeTap now requires the engine stopped (precondition) and
reconfigureEngine reinstalls the tap on every exit path via defer, so
engine.scopeTap never points at a stale channel layout.
- EngineConfigView stops the engine on a post-start (iOS) sample-rate
mismatch instead of running pitch-shifted, and surfaces non-mismatch
start errors through the alert.
- Remove redundant installScopeTap call in the demo controller (ShoeGaze.init
already installs it).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>