rename HAVE/NEED_BUFFER -> HAVE/NEED_DATA

It is more generic and works with control-only ports as well
This commit is contained in:
Wim Taymans 2019-09-16 12:55:23 +02:00
parent d648ea4ad3
commit 8b85cc225e
40 changed files with 176 additions and 176 deletions

View file

@ -353,7 +353,7 @@ static void client_process(void *data)
s->bar.beat = jp->bar * jp->beats_per_bar + jp->beat;
}
}
spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_BUFFER);
spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_DATA);
}
static const struct spa_jack_client_events client_events = {
@ -730,7 +730,7 @@ static int impl_node_process(void *object)
dst = jack_port_get_buffer(port->jack_port, n_frames);
if (io == NULL ||
io->status != SPA_STATUS_HAVE_BUFFER ||
io->status != SPA_STATUS_HAVE_DATA ||
io->buffer_id >= port->n_buffers) {
memset(dst, 0, n_frames * sizeof(float));
continue;
@ -742,9 +742,9 @@ static int impl_node_process(void *object)
memcpy(dst, src->data, n_frames * port->stride);
io->status = SPA_STATUS_NEED_BUFFER;
io->status = SPA_STATUS_NEED_DATA;
res |= SPA_STATUS_NEED_BUFFER;
res |= SPA_STATUS_NEED_DATA;
}
return res;
}

View file

@ -741,7 +741,7 @@ static int impl_node_process(void *object)
const void *src;
uint32_t n_frames = this->client->buffer_size;
if (io == NULL || io->status == SPA_STATUS_HAVE_BUFFER)
if (io == NULL || io->status == SPA_STATUS_HAVE_DATA)
continue;
if (io->buffer_id < port->n_buffers) {
@ -765,9 +765,9 @@ static int impl_node_process(void *object)
d->chunk->flags = 0;
io->buffer_id = b->id;
io->status = SPA_STATUS_HAVE_BUFFER;
io->status = SPA_STATUS_HAVE_DATA;
res |= SPA_STATUS_HAVE_BUFFER;
res |= SPA_STATUS_HAVE_DATA;
}
return res;
}