From: Geoffrey McRae <geoff@hostfission.com>
To: <qemu-devel@nongnu.org>
Cc: <kraxel@redhat.com>
Subject: [PATCH 1/6] audio/jack: fix invalid minimum buffer size check
Date: Thu, 11 Jun 2020 20:55:47 +1000 [thread overview]
Message-ID: <20200612001612.BCF003A016F@moya.office.hostfission.com> (raw)
Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
---
audio/jackaudio.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/audio/jackaudio.c b/audio/jackaudio.c
index 722ddb1dfe..d0b6f748f2 100644
--- a/audio/jackaudio.c
+++ b/audio/jackaudio.c
@@ -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;
--
2.20.1
next reply other threads:[~2020-06-12 0:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 10:55 Geoffrey McRae [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-11 10:55 [PATCH 1/6] audio/jack: fix invalid minimum buffer size check Geoffrey McRae
2020-06-13 4:05 [PATCH 0/6] audio/jack: fixes to overall jack behaviour Geoffrey McRae
2020-06-13 4:05 ` [PATCH 1/6] audio/jack: fix invalid minimum buffer size check Geoffrey McRae
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200612001612.BCF003A016F@moya.office.hostfission.com \
--to=geoff@hostfission.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).