feat: add tempo-synced stereo delay and coupled room reverb

This commit is contained in:
Johannes Findeisen 2026-11-05 23:53:03 +01:00
commit 7a01e2d2f3
12 changed files with 241 additions and 63 deletions

View file

@ -758,6 +758,13 @@ int main(int argc, char **argv)
CHECK(window.undo()==XTC_OK && window.undo(true)==XTC_OK);unlink("/tmp/xtc-sampler-gui.xtc");
size_t added=SIZE_MAX;CHECK(window.add_plugin(XTC_BUILTIN_PATH,effect,&added)==XTC_OK);
CHECK(added!=id);CHECK(window.undo()==XTC_OK);
unsigned int stereo=instrument+5;
CHECK(window.add_plugin(XTC_BUILTIN_PATH,stereo,&added)==XTC_OK);
CHECK(window.set_plugin_control(added,stereo==5 ? 3U : 4U,1)==XTC_OK);
CHECK(window.save_project("/tmp/xtc-stereo-gui.xtc")==XTC_OK);
CHECK(window.new_project()==XTC_OK && window.open_project("/tmp/xtc-stereo-gui.xtc")==XTC_OK);
CHECK(xtc_graph_get_plugin(xtc_project_graph(sequence->project()),added,&spec)==XTC_OK && spec.index==stereo);
unlink("/tmp/xtc-stereo-gui.xtc");
const xtc_project *before=sequence->project();reserve_result=XTC_ERR_OUT_OF_MEMORY;
CHECK(window.add_plugin(XTC_BUILTIN_PATH,effect)==XTC_ERR_OUT_OF_MEMORY && sequence->project()==before);
reserve_result=XTC_OK;unlink("/tmp/xtc-internal-gui.xtc");window.do_callback();

View file

@ -157,7 +157,7 @@ static void history_reservations(void)
static void builtin_failures(void)
{
unsigned int id;
for(id=0;id<5;++id) {
for(id=0;id<7;++id) {
int failure, succeeded=0; xtc_plugin_spec spec;
assert(xtc_plugin_probe(XTC_BUILTIN_PATH,id,48000,&spec)==XTC_OK);
if(id==4) {assert(getcwd(spec.sample_path,sizeof(spec.sample_path)));strcat(spec.sample_path,"/examples/projects/original-pluck.wav");}
@ -168,7 +168,8 @@ static void builtin_failures(void)
processing=1;
if(spec.instrument) {xtc_midi_event event={0,XTC_MIDI_NOTE_ON,0,60,100};
assert(xtc_plugin_process_midi(plugin,&event,1,out,256)==XTC_OK);
} else assert(xtc_plugin_process(plugin,in,out,256)==XTC_OK);
} else if(id>=5) {float right[256];assert(xtc_plugin_process_stereo_at(plugin,in,in,out,right,256,0)==XTC_OK);}
else assert(xtc_plugin_process(plugin,in,out,256)==XTC_OK);
processing=0;xtc_plugin_destroy(plugin);succeeded=1;break;
}
assert(succeeded);