Protect the global metadata with a lock because we update this from
multiple clients. Avoid updating the metadata if it didn't change.
Add a simple lock to protect the session objects, they could be
accessed from the main thread or data thread. Use the simple lock
in methods that just read.
Use the new data loop invoke to make sure we sync the data update
with the data thread.
Stop the data loop when our position io is removed.
Don't use a special name for the replacement libraries but install
them into the modules directory by default. Add an option to install
them into another location.
This way, we don't need to set up symlinks in development, distros can
choose to install them where they want and/or we can use symlinks or
LD_LIBRARY path to select the replacement versions.
Rework the metadata implementation without pw_properties to make
it easier to delete all subjects and implement the metadata API.
Remove metadata from all objects when they are destroyed.
Don't load and use rt-kit by default because it can cause sigkill in
the app, which is not good when it happens in a compositor.
Make the module profile a comma-separated list of profiles and make
it possible to explicitly load rtkit as well.
load the rtkit profile as well in jack.
JACK can handle 2 buffers at most, make the default buffer allocator
allocate 2 buffers when no params are given.
Prefer 2 buffers, it allows some form of async fill/consume
Don't unlink the mix->link when freeing, it is only linked when
in the free pool.
Protect against invalid number of buffers that could corrupt our
state.
Don't allocate the links in an array because they might be moved
when the array is resized. Instead just use calloc and add them
to a list.
Make sure we update the list used in the real-time thread from a
safe context.
Some plugins (calfjackhost) only call jack_port_get_buffer()
once and cache the pointer. This behaviour has been deprecated
in JACK2 but still works.
Add a workaround for this by getting a buffer ourselves and memcpy
into it from the scratch buffer.