[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/35] jackaudio: use more jack audio buffers
From: |
Gerd Hoffmann |
Subject: |
[PULL 13/35] jackaudio: use more jack audio buffers |
Date: |
Fri, 4 Mar 2022 15:21:01 +0100 |
From: Volker RĂ¼melin <vr_qemu@t-online.de>
The next patch reduces the effective qemu playback buffer size
by timer-period. Increase the number of jack audio buffers by
one to preserve the total effective buffer size. The size of one
jack audio buffer is 512 samples. With audio defaults that's
512 samples / 44100 samples/s = 11.6 ms and only slightly larger
than the timer-period of 10 ms.
The larger jack audio buffer increases audio dropout safety,
because the high priority jack-audio worker threads can provide
audio data for a longer period of time as with a smaller buffer
and more audio data in the mixing engine buffer that they can't
access.
Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20220301191311.26695-6-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/jackaudio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/audio/jackaudio.c b/audio/jackaudio.c
index 317009e93660..26246c3a8b43 100644
--- a/audio/jackaudio.c
+++ b/audio/jackaudio.c
@@ -483,8 +483,8 @@ static int qjack_client_init(QJackClient *c)
c->buffersize = 512;
}
- /* create a 2 period buffer */
- qjack_buffer_create(&c->fifo, c->nchannels, c->buffersize * 2);
+ /* create a 3 period buffer */
+ qjack_buffer_create(&c->fifo, c->nchannels, c->buffersize * 3);
qjack_client_connect_ports(c);
c->state = QJACK_STATE_RUNNING;
--
2.35.1
- [PULL 04/35] usb/ohci: Move cancelling async packet to ohci_stop_endpoints(), (continued)
- [PULL 04/35] usb/ohci: Move cancelling async packet to ohci_stop_endpoints(), Gerd Hoffmann, 2022/03/04
- [PULL 03/35] usb/ohci: Move trace point and log ep number to help debugging, Gerd Hoffmann, 2022/03/04
- [PULL 05/35] usb/ohci: Move USBPortOps related functions together, Gerd Hoffmann, 2022/03/04
- [PULL 06/35] usb/ohci: Merge ohci_async_cancel_device() into ohci_child_detach(), Gerd Hoffmann, 2022/03/04
- [PULL 08/35] audio: replace open-coded buffer arithmetic, Gerd Hoffmann, 2022/03/04
- [PULL 07/35] usb/ohci: Don't use packet from OHCIState for isochronous transfers, Gerd Hoffmann, 2022/03/04
- [PULL 09/35] audio: move function audio_pcm_hw_clip_out(), Gerd Hoffmann, 2022/03/04
- [PULL 10/35] audio: add function audio_pcm_hw_conv_in(), Gerd Hoffmann, 2022/03/04
- [PULL 12/35] paaudio: increase default latency to 46ms, Gerd Hoffmann, 2022/03/04
- [PULL 11/35] audio: inline function audio_pcm_sw_get_rpos_in(), Gerd Hoffmann, 2022/03/04
- [PULL 13/35] jackaudio: use more jack audio buffers,
Gerd Hoffmann <=
- [PULL 14/35] audio: copy playback stream in sequential order, Gerd Hoffmann, 2022/03/04
- [PULL 15/35] audio: add pcm_ops function table for capture backend, Gerd Hoffmann, 2022/03/04
- [PULL 16/35] Revert "audio: fix wavcapture segfault", Gerd Hoffmann, 2022/03/04
- [PULL 17/35] audio: restore mixing-engine playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 19/35] dsoundaudio: reduce effective playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 18/35] paaudio: reduce effective playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 21/35] paaudio: fix samples vs. frames mix-up, Gerd Hoffmann, 2022/03/04
- [PULL 25/35] hw/i386: Improve bounds checking in OVMF table parsing, Gerd Hoffmann, 2022/03/04
- [PULL 20/35] ossaudio: reduce effective playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 22/35] sdlaudio: fix samples vs. frames mix-up, Gerd Hoffmann, 2022/03/04