13
0
livetrax/session_utils
Paul Davis 5d023b4c60 libpbd: fix an important thinko for cross-thread signal architecture
The old code assumed that the thread that created a request buffer for a given
signal-emitting thread would be the latter thread, and thus a thread-local
pointer to the request buffer could be used. This turns out not to be true: the
GUI thread tends to be responsible for constructing the request buffers for
pre-registered threads.

That mechanism has been replaced by using a RWLock protected map using
pthread_t as the key and the request buffer as the value. This allows any
thread to create and register the request buffers used between any other pair
of threads (because the lookup always uses a pthread_t).

The symptoms of this problem were a signal emitted in an audioengine thread
that was propagated to the target thread, but when the target thread scans its
request buffers for requests, it finds nothing (because it didn't know about
the request buffer). In a sense, the signal was successfully delivered to the
target thread, but no meaningful work (i.e the signal handler) is performed.
2023-04-21 12:16:37 -06:00
..
ardour-util.sh.in
common.cc libpbd: fix an important thinko for cross-thread signal architecture 2023-04-21 12:16:37 -06:00
common.h
copy-mixer.cc Make RCU reader return a const pointer (omnibus commit) 2023-04-08 00:15:37 +02:00
debug
example.cc
export.cc switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr 2023-03-24 14:19:15 -06:00
new_empty_session.cc Change tools --help URLs to use https 2022-10-24 04:57:30 +02:00
new_session.cc Change tools --help URLs to use https 2022-10-24 04:57:30 +02:00
README
run
wscript wscript: consistently have at most one empty separator line 2022-04-09 12:16:40 +02:00

Ardour Session Utilities
========================

This folder contains some tools which directly use libardour to access ardour
sessions.

The overall goal it to provide some non-interactive unix-style commandline
tools, which are installed along with DAW.

These tools depend on the "dummy" backend to be available, configure ardour with e.g.

  ./waf configure --with-backends=jack,alsa,dummy ...


Adding new tools
----------------

One C++ source per tool, see "example.cc" and "export.cc"

  cp session_utils/example.cc session_utils/your_new_tool_name.cc
  edit session_utils/new_tool_name.cc
  ./waf

The tool is automatically compiled and deployed when installing, using the
program-name as prefix.  e.g.  "export.cc" becomes "ardour4-export"
(or "mixbus3-export", depending on the project configuration).
Tool names must start with lower-case alphabetic letter [a-z].


Test run from the source
------------------------

  cd session_utils
  ./run ardour6-your_new_tool_name

or

  ./run ardour6-export --help

and to debug the tool under gdb/lldb:

  ./debug ardour6-export