Dequeue a new buffer only once and reuse this queued buffer when
jack_port_get_buffer() is called multiple times in process().
Recycle an old buffer in the next cycle.
After calling process, mark all input buffers as consumed, process the
empty buffers and move the output buffers to the mix ports.
Fixes#1748
For our own ports, wait with emiting the connect_callback until we have
negotiated buffers on them (and have the peer_id). Some applications
use the connect_callback to decide when to start processing so we need
those buffers before we can do that.
Fixes startup issues with jack_midi_latency_test.
As long as we are inactive, don't update our internal buffer_size or
sample rate. This way, when we become active, we will emit the right
callback with the right value instead of doing nothing.
Fixes crashes in Carla.
When the node support transport sync. That is, when it will clear the
pending_sync flag from its activation area when it completed a new
seek.
Before this patch, the pending sync was always automatically cleared,
which broke some applications that are time masters such as bitwig.
Fixes#1589
Whenever a timebase owner is moved to a new driver, try to install it as
a timebase owner on the driver.
Before this patch, the timebase owner would only be installed on the
first driver is was assigned to, which was most likely a dummy driver.
See #1589
Change the buffer_size and sample_rate when we are sure the proces
callback is not running.
Delay process callback until we have called the buffer_size or
samplerate callback. Otherwise the jack application might be called with
the new buffer_size/sample_rate before the callback has been called.
Some applications might expect the process function to run concurrently
with the callbacks. PipeWire tries to avoid this by using a lock for the
duration of the process callback. Make an option to disable this.
See #1576
We just check the initial size of the buffer and remember that, we
should not emit (or schedule) a bufsize change callback.
Emiting the callback should really only be done after the buffer size
changes after activate completed.
Fixes some jconvolver startup problems.
Keep track of the last scheduled sync operation and wake up listeners
when it completes.
The waiters also compare against the last issued sync so that when multiple
syncs are pending from multiple threads, they will all wakeup instead of
just one.
Fixes some lockups with ardour6.
Keep the original type of the object around in the free list so that we
can still look it up.
Make most methods only find the still active object by checking if the
client matches.
Make some methods (jack_port_by_id() for example) also find the removed
objects for as long as they are in the cache and not overwritten.
This make carla and catia work better because they expect to access the
old object after it has been destroyed.
See #1531
Move the free object list as a global so that we can even access old
objects after client_closed.
Move the objects from a client to the global free list when we close
the client.
Ardour wants to access objects even after calling client_close() so
we need to keep them around a little longer.
See #1546
Almost no one will see that warning just like the rest of Meson
configuration warnings. So, if it's gonna yield a build with
dysfunctional JACK SDK, then it's best to make it explicitly fail
before people file bugs about missing jack.pc file.
To generate a correct jack pkg-config file unescape_variable
is required which was introduced with Meson 0.59.0.
When using an older version a warning is printed that no
jack.pc file is generated.
Use the port_set_mix_info event to get the id of the peer port for the
mixer input.
When asked for the buffer of one of those peer ports, we can get it from
the mixer input buffers.
Fixes#1471
spa_strstartswith() is more immediately understandable.
Coccinelle spatch file:
@@
expression E1, E2;
@@
- strstr(E1, E2) != E1
+ !spa_strstartswith(E1, E2)
@@
expression E1, E2;
@@
- strstr(E1, E2) == E1
+ spa_strstartswith(E1, E2)
Applied to the tree except for alsa/acp/compat.h because it looks like
that header is still mostly as-is from PA.
Because we only remove the client from the list after doing the lookup,
we will always find the removed node and the unregister event is
never called.
Fix this by marking the object as removing so that the lookup function
can skip the nodes being removed.
We should actually emit the graphorder callback whenever something
changed, also when a client or port was added/removed.
Also emit the graphorder callback right after a client is activated to
make jackdbus work.
Try harder to get the transport frame_rate from the position.
If we can't find an activation structure, use the configured frame_rate
instead of 0.
Fixes#1432
Use the pw_thread_utils interface to create/join and acquire/drop
RT priority. This allows JACK apps to also use the configured module to
handle RT priorities.
Add a function in data-loop to get the natvive thread and use that
in client_thread_id() so that it returns the pthread of the
data thread instead of the caller thread.