Phase 24: add mix buses, coherent peak meters and master clipping indicators
This commit is contained in:
parent
ba5c2503a7
commit
2fd7724065
32 changed files with 632 additions and 61 deletions
|
|
@ -144,6 +144,11 @@ xtc_result xtc_backend_submit(xtc_backend *backend, const xtc_graph *graph)
|
|||
return XTC_OK;
|
||||
}
|
||||
xtc_result xtc_backend_panic(xtc_backend *) { xtc_midi_plan_panic(handle.midi, engine_status.sample_position); return XTC_OK; }
|
||||
xtc_result xtc_backend_read_meters(xtc_backend *, xtc_meter_snapshot *out)
|
||||
{
|
||||
*out = {}; out->master_left = engine_status.peak_left; out->master_right = engine_status.peak_right;
|
||||
return XTC_OK;
|
||||
}
|
||||
xtc_result xtc_backend_prepare_project(xtc_backend *backend, const xtc_project *project)
|
||||
{
|
||||
xtc_audio_plan *plan = nullptr;
|
||||
|
|
@ -602,6 +607,27 @@ int main(int argc, char **argv)
|
|||
CHECK((sx != gx || sy != gy) && (sx != ox || sy != oy) && (gx != ox || gy != oy));
|
||||
window.do_callback();
|
||||
}
|
||||
{
|
||||
reset(); MainWindow window(false);
|
||||
auto *sequence = timeline(&window); auto *mixer = window.mixer();
|
||||
CHECK(sequence->add_track() == XTC_OK);
|
||||
CHECK(mixer->add_bus() == XTC_OK);
|
||||
uint64_t bus = mixer->selected_track();
|
||||
xtc_track_info track{};
|
||||
CHECK(xtc_project_get_track(sequence->project(),1,&track) == XTC_OK && track.is_bus);
|
||||
CHECK(mixer->mix(.5f,1,0,1) == XTC_OK);
|
||||
CHECK(mixer->select_track(0) && mixer->route(bus) == XTC_OK);
|
||||
CHECK(xtc_project_get_track(sequence->project(),0,&track) == XTC_OK && track.bus_id == bus);
|
||||
CHECK(window.undo() == XTC_OK);
|
||||
CHECK(xtc_project_get_track(sequence->project(),0,&track) == XTC_OK && track.bus_id == UINT64_MAX);
|
||||
CHECK(window.undo(true) == XTC_OK);
|
||||
CHECK(xtc_project_get_track(sequence->project(),0,&track) == XTC_OK && track.bus_id == bus);
|
||||
mixer->peaks(1.25f,.5f); mixer->track_peaks(.5f,.25f);
|
||||
CHECK(mixer->master_clipped() && contains(&window,"dBFS CLIP"));
|
||||
mixer->peaks(0,0); CHECK(mixer->master_clipped());
|
||||
mixer->reset_meters(); CHECK(!mixer->master_clipped());
|
||||
window.do_callback();
|
||||
}
|
||||
if (const char *module = std::getenv("XTC_TEST_PLUGIN")) {
|
||||
reset();
|
||||
MainWindow window(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue