mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
raop: Add call to pa_sink_set_max_request()
This is just a copy from the ESD version which is a little crude, but will do for now.
This commit is contained in:
parent
39576ec829
commit
205cbe8afc
1 changed files with 10 additions and 1 deletions
|
|
@ -135,13 +135,22 @@ enum {
|
||||||
/* Forward declaration */
|
/* Forward declaration */
|
||||||
static void sink_set_volume_cb(pa_sink *);
|
static void sink_set_volume_cb(pa_sink *);
|
||||||
|
|
||||||
static void on_connection(PA_GCC_UNUSED int fd, void*userdata) {
|
static void on_connection(int fd, void*userdata) {
|
||||||
|
int so_sndbuf = 0;
|
||||||
|
socklen_t sl = sizeof(int);
|
||||||
struct userdata *u = userdata;
|
struct userdata *u = userdata;
|
||||||
pa_assert(u);
|
pa_assert(u);
|
||||||
|
|
||||||
pa_assert(u->fd < 0);
|
pa_assert(u->fd < 0);
|
||||||
u->fd = fd;
|
u->fd = fd;
|
||||||
|
|
||||||
|
if (getsockopt(u->fd, SOL_SOCKET, SO_SNDBUF, &so_sndbuf, &sl) < 0)
|
||||||
|
pa_log_warn("getsockopt(SO_SNDBUF) failed: %s", pa_cstrerror(errno));
|
||||||
|
else {
|
||||||
|
pa_log_debug("SO_SNDBUF is %zu.", (size_t) so_sndbuf);
|
||||||
|
pa_sink_set_max_request(u->sink, PA_MAX((size_t) so_sndbuf, u->block_size));
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the initial volume */
|
/* Set the initial volume */
|
||||||
sink_set_volume_cb(u->sink);
|
sink_set_volume_cb(u->sink);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue