Port added before activate should trigger a port_register callback when
the client is activated.
When calling jack_deactivate, the port_register callback should be
called.
See #2638
There are core errors that should not trigger a shutdown, like invalid
or destroyed proxy replies. Only do shutdown when we get EPIPE, which is
when the server is stopped.
See #3070
Set the active state to false right when we start deactivate to make
sure that we don't call any callbacks anymore during shutdown.
One of the callbacks that might be called is the bufsize of samplerate
change callbacks when the node is moved to the dummy driver and this
might deadlock any app that doesn't expect this.
Fixes#2781
this event extends the bound_id event and sends the global properties as
well.
This can be used to get the object.serial, for example.
It can also be used in the future to let the server generate unique
property values, like the node.name, and let the client know about the
new property value.
PIPEWIRE_LINK_PASSIVE is to let this client make passive links, this
doesn't mean that the client wants passive links to its own node in all
cases so don't use the node.passive for that.
Instead use a new jack.passive-links. This can then also be set per
client to make it make passive links.
On glibc, `pthread_t` is `unsigned long int` while on musl
it has a pointer type. To avoid format string warnings,
cast it to `void *` and use the `%p` format specifier.
Make jack.merge-monitor true by default because this is what JACK also
does.
Add an exception for Mixxx because that makes it easier to select the
capture/monitor ports.
Fixes#1760
PIPEWIRE_NODE is mapped to TARGET_OBJECT so it contains the serial or
the node name.
Make sure pw-stream maps this to TARGET_OBJECT.
Make JACK use the PIPEWIRE_NODE for serial or node.name.
Use the same sorting as ardour for midi events with the same timestamp
so that the order is:
Controller messages > Program Change > Note Off > Note On >
Note Pressure > Channel Pressure > Pitch Bend
Fixes#1868
Let the node.passive property make passive links. PIPEWIRE_LINK_PASSIVE
overrides the node property.
Add some nice tweaks for qsynth so that it suspends and fades out
nicely by default.
We don't always need to send buffers to a remote port, when the port
is an output port, all the mix ports use the same buffers. This means
that when we add another link to a port, we don't get the mix_info
anymore and then we don't know the peer_id and we don't complete the
link and we don't call the connection_callback.
Instead, send the mix_info right before sending the Buffer Io area. We
always do this for all mix io and after we have sent the buffers so this
is a better place.
Fixes#2841
Bind to the settings metadata.
Add a property to control if a client will set a temporary or global
quantum whith jack_bufsize.
Make a match rule for jack_bufsize and force a global quantum change.
Fixes#1273
Instead of calling the default implementation that does not implement
these methods, keep the last thread-utils around in a global and use
that instead.
Clang 15 at least with my build configuration emits warnings about
function prototypes that lack argument types. Most notably this
happens with functions that take no arguments which in compiler view
equates to the void type i.e. void f(void) instead of void f(). As I
understand, this will become an error in some future Clang release,
so might as well fix it now.
Since these were discovered not by a linter but by the actual compiler
for my particular build configuration, some f() may have escaped for
now. But at least it's enough to build PipeWire with most optional
features enabled even when -Werror=strict-prototypes is enabled.
For anyone else wanting to have a go at this, these can be upgraded
from warnings to errors by adding -Werror=strict-prototypes to the
custom CFLAGS which probably works with GCC, too, but has only been
done with Clang 15.0.2.
Finally my editor automatically stripped trailing spaces upon saving
the modified files. I assume it's probably not worth keeping those
invisible bytes around but this may have slightly dubious implications
as it did also turn indented empty lines of JACK license header into
regular empty lines.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
Make sure all jack nodes from the same pid are in the same group.
It is normally not a problem for different JACK clients to live in
different groups and be scheduled by different drivers with different
quantum and rate.
Some applications (like Carla), however, make multiple clients and
expect all of them to use the same quantum and rate. Enforce this by
adding all jack clients to the application jack group.
When the `client` argument is NULL, return a zero initialized
`pthread_t` object from `jack_client_thread_id()`. Returning
`-EINVAL` can be problematic because even though `pthread_t` is
a typedef for `unsigned long` in glibc, it is still a pointer,
not a numeric identifier. And in musl, it is a typedef to a
pointer, which results in a warning:
In file included from ../spa/include/spa/support/cpu.h:34,
from ../pipewire-jack/src/pipewire-jack.c:40:
../pipewire-jack/src/pipewire-jack.c: In function 'jack_client_thread_id':
../spa/include/spa/utils/defs.h:274:11: warning: returning 'int' from a function with return type 'jack_native_thread_t' {aka 'struct __pthread *'} makes pointer from integer without a cast [-Wint-conversion]
274 | return (val); \
| ^
../pipewire-jack/src/pipewire-jack.c:3775:2: note: in expansion of macro 'spa_return_val_if_fail'
3775 | spa_return_val_if_fail(c != NULL, -EINVAL);
For a JACK client, the context and node is the same. It makes sense to
also run the rules on the context properties so that application
name etc. can be matched as well.
Fixes#2580
Pass MIDI events as they are.
JACK requires NoteOn 0-velocity midi events to be patched to NoteOff
events for compatibility with LV2 plugins. Let's do this patchup in
the JACK layer then and add an option to disable it.
It's best to pass the midi messages unmodified and then patch them up
wherever they need patching up.