mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
Completely rework ALSA device selection code: choose the device to open depending on the requested number of channels and channel map. In most cases it will now suffice to set default-channels=6 to enable 5.1 sound for all devices that support it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2050 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f752882525
commit
d17bb53d3e
15 changed files with 350 additions and 122 deletions
|
|
@ -179,11 +179,11 @@ int pa__init(pa_module*m) {
|
|||
pa_source_output *o = NULL;
|
||||
uint8_t payload;
|
||||
char *p;
|
||||
int r;
|
||||
int r, j;
|
||||
socklen_t k;
|
||||
struct timeval tv;
|
||||
char hn[128], *n;
|
||||
int loop = 0;
|
||||
pa_bool_t loop = FALSE;
|
||||
pa_source_output_new_data data;
|
||||
|
||||
pa_assert(m);
|
||||
|
|
@ -274,8 +274,9 @@ int pa__init(pa_module*m) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) < 0 ||
|
||||
setsockopt(sap_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) < 0) {
|
||||
j = !!loop;
|
||||
if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0 ||
|
||||
setsockopt(sap_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0) {
|
||||
pa_log("IP_MULTICAST_LOOP failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue