mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-20 05:33:55 -04:00
pipewire-jack: only call timebase on 0 status
If the status passed to cycle_signal != 0 we should not call the timebase callback. We already do this but we can use this fact to also not call the timebase_callback when there was no buffer_frames configured yet. Do this by setting the fallback return value of process_callback to != 0. When there is no buffer_frames yet, this will be used and we can then avoid the buffer_frames check in cycle_signal.
This commit is contained in:
parent
244c3b597f
commit
5ade045654
1 changed files with 2 additions and 2 deletions
|
|
@ -2172,7 +2172,7 @@ static inline void cycle_signal(struct client *c, int status)
|
|||
struct pw_node_activation *driver = c->rt.driver_activation;
|
||||
struct pw_node_activation *activation = c->activation;
|
||||
|
||||
if (SPA_LIKELY(status == 0 && c->buffer_frames != (uint32_t)-1)) {
|
||||
if (SPA_LIKELY(status == 0)) {
|
||||
if (c->timebase_callback && driver && driver->segment_owner[0] == c->node_id) {
|
||||
if (activation->pending_new_pos ||
|
||||
c->jack_state == JackTransportRolling ||
|
||||
|
|
@ -2210,7 +2210,7 @@ on_rtsocket_condition(void *data, int fd, uint32_t mask)
|
|||
}
|
||||
} else if (SPA_LIKELY(mask & SPA_IO_IN)) {
|
||||
uint32_t buffer_frames;
|
||||
int status = 0;
|
||||
int status = -EBUSY;
|
||||
|
||||
buffer_frames = cycle_run(c);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue