mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: Don't send more than fragsize chunks
Send exactly fragsize chunks when capturing. See #2418 and #2434
This commit is contained in:
parent
d3597ed149
commit
68bafcf166
1 changed files with 1 additions and 5 deletions
|
|
@ -87,9 +87,6 @@
|
||||||
#define DEFAULT_POSITION "[ FL FR ]"
|
#define DEFAULT_POSITION "[ FL FR ]"
|
||||||
|
|
||||||
#define MAX_FORMATS 32
|
#define MAX_FORMATS 32
|
||||||
/* The max amount of data we send in one block when capturing. In PulseAudio this
|
|
||||||
* size is derived from the mempool PA_MEMPOOL_SLOT_SIZE */
|
|
||||||
#define MAX_FRAGSIZE (64*1024)
|
|
||||||
|
|
||||||
#define TEMPORARY_MOVE_TIMEOUT (SPA_NSEC_PER_SEC)
|
#define TEMPORARY_MOVE_TIMEOUT (SPA_NSEC_PER_SEC)
|
||||||
|
|
||||||
|
|
@ -1326,8 +1323,7 @@ do_process_done(struct spa_loop *loop,
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((uint32_t)avail >= stream->attr.fragsize) {
|
while ((uint32_t)avail >= stream->attr.fragsize) {
|
||||||
towrite = SPA_MIN(avail, MAX_FRAGSIZE);
|
towrite = SPA_MIN((uint32_t)avail, stream->attr.fragsize);
|
||||||
towrite = SPA_ROUND_DOWN(towrite, stream->frame_size);
|
|
||||||
|
|
||||||
msg = message_alloc(impl, stream->channel, towrite);
|
msg = message_alloc(impl, stream->channel, towrite);
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue