diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-02 17:03:33 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-02 17:03:33 +0100 |
commit | 2ed145cfd4cf02ea5d83df5558df23bafa7e298c (patch) | |
tree | e54f788498193a1c06563f0239dc299817de49f2 /libs/ardour/session_process.cc | |
parent | 83c964cfd44756197ff0f3eeb8f584718f313439 (diff) |
allow Lua session scripts to inject [immediate] RT-events
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r-- | libs/ardour/session_process.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index eaa1d05503..ad6ed1c16a 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -359,8 +359,14 @@ Session::process_with_events (pframes_t nframes) if (events.empty() || next_event == events.end()) { try_run_lua (nframes); // also during export ?? ->move to process_without_events() - process_without_events (nframes); - return; + /* lua scripts may inject events */ + while (_n_lua_scripts > 0 && pending_events.read (&ev, 1) == 1) { + merge_event (ev); + } + if (events.empty() || next_event == events.end()) { + process_without_events (nframes); + return; + } } if (_transport_speed == 1.0) { |