Phase 16: persist sample-timed effect automation and add expressive MIDI controls
This commit is contained in:
parent
f72314b5a3
commit
7fac0a4f6a
23 changed files with 374 additions and 39 deletions
|
|
@ -124,6 +124,7 @@ static int process(jack_nframes_t frames, void *context)
|
|||
} else {
|
||||
const float *input = jack_port_get_buffer(backend->input, frames);
|
||||
uint64_t position = __atomic_load_n(&backend->sample_position, __ATOMIC_RELAXED);
|
||||
(void)xtc_realtime_position(backend->engine,position);
|
||||
if (backend->recorder)
|
||||
xtc_recorder_push(backend->recorder, input, (size_t)frames);
|
||||
if (backend->audio)
|
||||
|
|
@ -434,6 +435,7 @@ xtc_result xtc_backend_seek(xtc_backend *backend, uint64_t sample)
|
|||
__atomic_load_n(&backend->rate_changed, __ATOMIC_ACQUIRE))
|
||||
return XTC_ERR_INVALID_STATE;
|
||||
xtc_midi_plan_reset(backend->midi);
|
||||
(void)xtc_realtime_position(backend->engine,sample);
|
||||
__atomic_store_n(&backend->sample_position, sample, __ATOMIC_RELAXED);
|
||||
return XTC_OK;
|
||||
}
|
||||
|
|
@ -467,6 +469,7 @@ xtc_result xtc_backend_submit(xtc_backend *backend, const xtc_graph *graph)
|
|||
* Notifications never access engine. Preserve old engine until ready. */
|
||||
xtc_realtime_destroy(backend->engine);
|
||||
backend->engine = replacement;
|
||||
(void)xtc_realtime_position(backend->engine,__atomic_load_n(&backend->sample_position,__ATOMIC_RELAXED));
|
||||
__atomic_store_n(&backend->process_result, (unsigned int)XTC_OK, __ATOMIC_RELAXED);
|
||||
return XTC_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue