audio/jack: fix invalid minimum buffer size check
PATCH 1/6 audio/jack: fix invalid minimum buffer size check
Signed-off-by Geoffrey McRae <[email protected]>
--- audio/jackaudio.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
audio/jackaudio.c +11 -11
@@ -434,17 +434,6 @@ static int qjack_client_init(QJackClient *c)jack_set_xrun_callback (c->client, qjack_xrun, c);jack_on_shutdown (c->client, qjack_shutdown, c); -/* -* ensure the buffersize is no smaller then 512 samples, some (all?) qemu -* virtual devices do not work correctly otherwise -*/ -if (c->buffersize <512 ) { - c->buffersize =512 ; - } - -/* create a 2 period buffer */ -qjack_buffer_create (&c->fifo, c->nchannels, c->buffersize *2 ); -/* allocate and register the ports */ c->port =g_malloc (sizeof (jack_port_t *) * c->nchannels);for (int i =0 ; i < c->nchannels; ++i) {
@@ -468,6 +457,17 @@ static int qjack_client_init(QJackClient *c)jack_activate (c->client); c->buffersize =jack_get_buffer_size (c->client); +/* +* ensure the buffersize is no smaller then 512 samples, some (all?) qemu +* virtual devices do not work correctly otherwise +*/ +if (c->buffersize <512 ) { + c->buffersize =512 ; + } + +/* create a 2 period buffer */ +qjack_buffer_create (&c->fifo, c->nchannels, c->buffersize *2 ); +qjack_client_connect_ports (c); c->state =QJACK_STATE_RUNNING ;return 0 ;
Signature · 1 line
2.20.1