Skip to content

fix(mock): mock audioplayer and jack-volume register JACK ports and report RUNNING - #37

Open
ibiltari wants to merge 1 commit into
rc_1from
fix/mock-players-jack-ready
Open

ibiltari wants to merge 1 commit into
rc_1from
fix/mock-players-jack-ready

Conversation

@ibiltari

Copy link
Copy Markdown
Member

ClickUp: 869fhghhe

Problem

On a mock box (cuems-engine-mock, e.g. dev.stagelab.coop) every audio cue arm waited the full 14.5 s RUNNING timeout and logged the cue as SILENT. The engine waits for a player's [OK] RUNNING! line before wiring it (869fbyjzx) and then gates wiring on the player's JACK ports. The log-only mocks printed neither and registered no ports. arm_test took ~30 s to arm instead of ~1 s, and every STOP re-arm paid the same again. The mock mixer had no ports either, so its output wiring retried for ~10 s at node start.

Change (mock scripts only, nothing the real engine runs)

  • New scripts/mock_jack.py: opens a JACK client with given port names and prints the ready line. With no JACK server (or no jack module) it logs a warning and the mock stays a log-only OSC endpoint, as before.
  • mock_audioplayer: client Audio_Player-<uuid> with outport 0 / outport 1, same names as cuems-audioplayer.
  • mock_jack_volume: client named by -c, ports input_1..N / output_1..N, same as jack-volume.

Test plan

  • black, isort, flake8
  • dev.stagelab.coop (jackd dummy driver): arm_test arms in ~2.5 s (was ~30 s), STOP re-arm ~0.4 s, no "never reported RUNNING", jack_lsp -c shows the players wired into 0_mixer
  • engine suite (not run yet: test2 is busy)

…eport RUNNING

Since the engine waits for a player's "[OK] RUNNING!" line before wiring it
(869fbyjzx) and gates wiring on the player's JACK ports, the log-only mocks
made every audio arm on a mock box wait the full 14.5 s RUNNING timeout and
log the cue as SILENT; arm_test on dev.stagelab.coop took ~30 s to arm
instead of ~1 s, and every STOP re-arm paid it again. The mock mixer had no
ports either, so its output wiring retried for ~10 s at node start.

Both mocks now open the same JACK client and ports as the real binaries
(Audio_Player-<uuid> with "outport 0"/"outport 1"; jack-volume's -c client
with input_N/output_N) against the jackd-dummy server, and print the ready
line. Without a JACK server they stay log-only OSC endpoints as before.
@ibiltari
ibiltari requested a review from backenv as a code owner October 15, 2026 18:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant