feat(midi): qualify routed startup and refresh workflow screenshots (phase 105)
This commit is contained in:
parent
f37ad8987a
commit
25d4ad5d3b
73 changed files with 208 additions and 37 deletions
|
|
@ -59,7 +59,7 @@ int main(void)
|
|||
jack_status_t flags = 0;
|
||||
probe state = {0};
|
||||
const char *destination;
|
||||
uint64_t track, clip, note;
|
||||
uint64_t track, clip, note;unsigned int before_scheduled;
|
||||
int result = EXIT_FAILURE;
|
||||
REQUIRE(mkdtemp(directory));
|
||||
snprintf(song, sizeof(song), "%s/song.xtc", directory);
|
||||
|
|
@ -77,7 +77,7 @@ int main(void)
|
|||
REQUIRE(state.input && state.right && state.midi && state.receive);
|
||||
REQUIRE(xtc_backend_set_midi_options(backend,-1,-1,1)==XTC_OK);
|
||||
REQUIRE(jack_set_process_callback(client, process, &state) == 0 && jack_activate(client) == 0);
|
||||
REQUIRE(xtc_backend_start(backend) == XTC_OK);
|
||||
REQUIRE(xtc_backend_start_routed(backend,jack_port_name(state.midi),jack_port_name(state.receive)) == XTC_OK);
|
||||
REQUIRE(xtc_backend_midi_port_name(backend, &destination) == XTC_OK);
|
||||
wait_blocks(); /* PipeWire JACK publishes newly activated ports asynchronously. */
|
||||
{
|
||||
|
|
@ -109,14 +109,18 @@ int main(void)
|
|||
REQUIRE(xtc_project_set_mix(p, track, 0.5f, 1, 0, 0) == XTC_OK);
|
||||
REQUIRE(xtc_project_save(p, song) == XTC_OK && xtc_project_load(q, song) == XTC_OK);
|
||||
REQUIRE(xtc_backend_prepare_project(backend, q) == XTC_OK);
|
||||
REQUIRE(xtc_backend_seek(backend, 0) == XTC_OK && xtc_backend_start(backend) == XTC_OK);
|
||||
before_scheduled=__atomic_load_n(&state.midi_on,__ATOMIC_RELAXED);
|
||||
REQUIRE(xtc_backend_seek(backend, 0) == XTC_OK && xtc_backend_start_routed(backend,NULL,jack_port_name(state.receive)) == XTC_OK);
|
||||
wait_blocks(); /* Publish restarted PipeWire ports before connecting. */
|
||||
REQUIRE(xtc_backend_connect(backend, XTC_PORT_OUTPUT, jack_port_name(state.input)) == XTC_OK);
|
||||
{ const char *own; REQUIRE(xtc_backend_output_name(backend, 1, &own) == XTC_OK);
|
||||
int connected = jack_connect(client, own, jack_port_name(state.right)); REQUIRE(connected == 0 || connected == EEXIST); }
|
||||
wait_blocks(); REQUIRE(!__atomic_load_n(&state.loud, __ATOMIC_RELAXED) && __atomic_load_n(&state.right_loud, __ATOMIC_RELAXED));
|
||||
REQUIRE(__atomic_load_n(&state.midi_on,__ATOMIC_RELAXED)>before_scheduled);
|
||||
{ xtc_backend_status status; REQUIRE(xtc_backend_get_status(backend, &status) == XTC_OK && status.peak_left == 0 && status.peak_right > 0); }
|
||||
REQUIRE(xtc_backend_stop(backend) == XTC_OK);
|
||||
REQUIRE(xtc_backend_seek(backend, 7680000) == XTC_OK && xtc_backend_start(backend) == XTC_OK);
|
||||
wait_blocks();
|
||||
REQUIRE(xtc_backend_connect(backend, XTC_PORT_OUTPUT, jack_port_name(state.input)) == XTC_OK);
|
||||
{ const char *own; REQUIRE(xtc_backend_output_name(backend, 1, &own) == XTC_OK);
|
||||
int connected = jack_connect(client, own, jack_port_name(state.right)); REQUIRE(connected == 0 || connected == EEXIST); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue