Phase 6: Add WAV clips, graph playback and bounded recording
This commit is contained in:
parent
65640c4aad
commit
8a37090b81
40 changed files with 1450 additions and 69 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace {
|
||||
Fl_Widget *find(Fl_Group &group, const char *label)
|
||||
|
|
@ -91,6 +92,21 @@ int main(int argc, char **argv)
|
|||
play->do_callback();
|
||||
pump();
|
||||
CHECK(find(window, "running — modular graph") != nullptr);
|
||||
stop->do_callback();
|
||||
char directory[] = "/tmp/xtc-live-record-XXXXXX"; CHECK(mkdtemp(directory) != nullptr);
|
||||
std::string take = std::string(directory) + "/take.wav";
|
||||
std::string song = std::string(directory) + "/song.xtc";
|
||||
CHECK(window.record_audio(take.c_str()) == XTC_OK);
|
||||
pump();
|
||||
CHECK(find(window, "recording JACK input") != nullptr);
|
||||
stop->do_callback();
|
||||
size_t tracks, clips;
|
||||
CHECK(xtc_project_get_counts(timeline->project(), &tracks, &clips) == XTC_OK && clips == 1);
|
||||
CHECK(window.save_project(song.c_str()) == XTC_OK);
|
||||
CHECK(window.open_project(song.c_str()) == XTC_OK);
|
||||
play->do_callback(); pump();
|
||||
CHECK(find(window, "running — modular graph") != nullptr);
|
||||
CHECK(unlink(take.c_str()) == 0 && unlink(song.c_str()) == 0 && rmdir(directory) == 0);
|
||||
window.do_callback(); // Close with an active client; synchronizes callbacks.
|
||||
CHECK(!window.shown());
|
||||
pump(); // No timer may access the closed client.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue