mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
audioconvert: add support for buffer data mmap
When there is no data and the buffer is mmapable, try to mmap it. Unmap again when clearing the buffers. Use the mmaped data pointer of the buffer when processing.
This commit is contained in:
parent
9ceb4310f8
commit
328718f958
2 changed files with 43 additions and 15 deletions
|
|
@ -1335,7 +1335,6 @@ static int clear_buffers(struct impl *this, struct port *port)
|
|||
spa_log_debug(this->log, "%p: clear buffers %p %d", this, port, port->n_buffers);
|
||||
for (i = 0; i < port->n_buffers; i++) {
|
||||
struct buffer *b = &port->buffers[i];
|
||||
spa_log_debug(this->log, "%p: %d %p %d", this, i, b, b->flags);
|
||||
if (SPA_FLAG_IS_SET(b->flags, BUFFER_FLAG_MAPPED)) {
|
||||
for (j = 0; j < b->buf->n_datas; j++) {
|
||||
if (b->datas[j]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue