mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
Merge branch 'autopulse'
This commit is contained in:
commit
44ad4a8848
@ -229,11 +229,8 @@ If you select Pulseaudio, the "card" setting in the config file has no effect.
|
||||
Instead all soundcards detected by Pulseaudio will be listed as speakers by
|
||||
forked-daapd.
|
||||
|
||||
There is some one-time setup required to use Pulseaudio:
|
||||
- Add the forked-daapd user (probably "daapd") to the "pulse-access" group.
|
||||
- On non-desktop/headless systems, you will need to run Pulseaudio in system
|
||||
mode. For this, you will probably want to install a SystemD .service file
|
||||
(Google will help you), so Pulseaudio automatically starts at boot.
|
||||
There is some one-time setup required to use Pulseaudio: Add the forked-daapd
|
||||
user (probably "daapd") to the "pulse-access" group.
|
||||
|
||||
|
||||
## MP3 network streaming (streaming to iOS)
|
||||
|
@ -346,9 +346,9 @@ signal_signalfd_cb(int fd, short event, void *arg)
|
||||
switch (info.ssi_signo)
|
||||
{
|
||||
case SIGCHLD:
|
||||
DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD, reaping children\n");
|
||||
DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD\n");
|
||||
|
||||
while (wait3(&status, WNOHANG, NULL) > 0)
|
||||
while (waitpid(-1, &status, WNOHANG) > 0)
|
||||
/* Nothing. */ ;
|
||||
break;
|
||||
|
||||
@ -391,9 +391,9 @@ signal_kqueue_cb(int fd, short event, void *arg)
|
||||
switch (ke.ident)
|
||||
{
|
||||
case SIGCHLD:
|
||||
DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD, reaping children\n");
|
||||
DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD\n");
|
||||
|
||||
while (wait3(&status, WNOHANG, NULL) > 0)
|
||||
while (waitpid(-1, &status, WNOHANG) > 0)
|
||||
/* Nothing. */ ;
|
||||
break;
|
||||
|
||||
|
@ -786,6 +786,16 @@ pulse_init(void)
|
||||
if (type && (strcasecmp(type, "pulseaudio") != 0))
|
||||
return -1;
|
||||
|
||||
// In some situations Pulseaudio won't autospawn, and we don't want to trouble
|
||||
// the user with setting up system mode (which isn't recommended anyway), so
|
||||
// we use this sledgehammer approach
|
||||
ret = system("pulseaudio --start");
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_LAUDIO, "Could not start Pulseaudio\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
if (!(p->mainloop = pa_threaded_mainloop_new()))
|
||||
|
Loading…
Reference in New Issue
Block a user