feat: add scene-based recording, e2e tests, and improved TUI state indicators
This commit is contained in:
committed by
Loic Coenen (aider)
parent
f2993eac80
commit
7c289e1496
@@ -1018,17 +1018,19 @@ static int test_wav_save(void) {
|
||||
kill(pid, SIGTERM); waitpid(pid, NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
/* FIFO: record channel 0, then stop to create a loop */
|
||||
|
||||
/* Use FIFO command to start recording */
|
||||
if (send_fifo_command("record 0") != 0) {
|
||||
jack_client_close(client);
|
||||
kill(pid, SIGTERM); waitpid(pid, NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
safe_usleep(200000);
|
||||
/* start generating a beep */
|
||||
|
||||
/* Set up beep generation for 3 seconds */
|
||||
int sr = jack_get_sample_rate(client);
|
||||
continuous_sine = 0;
|
||||
beep_remaining = (int)(0.5f * sr);
|
||||
beep_remaining = (int)(3.0f * sr);
|
||||
bursts = 0; prev_above = 0;
|
||||
passthrough_output_port = audio_out;
|
||||
passthrough_input_port = audio_in;
|
||||
@@ -1040,23 +1042,23 @@ static int test_wav_save(void) {
|
||||
passthrough_done = 0;
|
||||
jack_set_process_callback(client, passthrough_process, NULL);
|
||||
if (jack_activate(client)) {
|
||||
jack_deactivate(client);
|
||||
jack_client_close(client);
|
||||
kill(pid, SIGTERM); waitpid(pid, NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
safe_usleep(3000000); /* record for 3s (ensure enough beep) */
|
||||
|
||||
/* Send second record command to transition RECORD → LOOPING */
|
||||
/* Second FIFO command to transition RECORD → LOOPING */
|
||||
if (send_fifo_command("record 0") != 0) {
|
||||
jack_deactivate(client);
|
||||
jack_client_close(client);
|
||||
kill(pid, SIGTERM); waitpid(pid, NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
safe_usleep(1000000); /* give time for state change and loop_count to be set */
|
||||
safe_usleep(3000000); /* give time for state change and loop_count to be set */
|
||||
|
||||
/* save */
|
||||
/* save via FIFO command */
|
||||
if (send_fifo_command("save") != 0) {
|
||||
jack_deactivate(client);
|
||||
jack_client_close(client);
|
||||
|
||||
Reference in New Issue
Block a user