Browse Source

buffer_resize: only reallocate portbuffers, if number of connections is > 1

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@3892 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.120.1
torben 16 years ago
parent
commit
bec1a45a67
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      libjack/client.c

+ 7
- 2
libjack/client.c View File

@@ -416,10 +416,15 @@ jack_client_fix_port_buffers (jack_client_t *client)
jack_port_type_buffer_size( port->type_info,
client->engine->buffer_size );
jack_pool_release (port->mix_buffer);
port->mix_buffer = jack_pool_alloc (buffer_size);
port->fptr.buffer_init (port->mix_buffer,
port->mix_buffer = NULL;
pthread_mutex_lock (&port->connection_lock);
if (jack_slist_length (port->connections) > 1) {
port->mix_buffer = jack_pool_alloc (buffer_size);
port->fptr.buffer_init (port->mix_buffer,
buffer_size,
client->engine->buffer_size);
}
pthread_mutex_unlock (&port->connection_lock);
}
}
}


Loading…
Cancel
Save