~michael-sheldon/ubuntu-touch-session/fix-1659388

« back to all changes in this revision

Viewing changes to upstart-session/pulseaudio.conf

  • Committer: CI Train Bot
  • Author(s): Łukasz 'sil2100' Zemczak
  • Date: 2016-04-07 11:59:03 UTC
  • mfrom: (280.1.1 ubuntu-touch-session)
  • Revision ID: ci-train-bot@canonical.com-20160407115903-yilpjrfhhb9xyqe3
Add an etc profile.d to add the /custom/usr/share directory to enable using customized notification sounds by the push client. Fixes: #1413818

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
stop on session-end
6
6
 
7
7
respawn
 
8
expect daemon
 
9
 
 
10
pre-start script
 
11
    # Use the Touch specific Pulseaudio script file
 
12
    initctl set-env --global PULSE_SCRIPT=/etc/pulse/touch.pa
 
13
    initctl set-env --global PULSE_CLIENTCONFIG=/etc/pulse/touch-client.conf
 
14
 
 
15
    # Force a default audio role (apps can overwrite this)
 
16
    initctl set-env --global PULSE_PROP='media.role=multimedia'
 
17
 
 
18
    # Force server-side corking when stalled (playback)
 
19
    initctl set-env --global PULSE_PLAYBACK_CORK_STALLED=1
 
20
end script
8
21
 
9
22
exec pulseaudio --start --log-target=syslog
 
23
 
 
24
# Upstart tracks fork() calls, but what Pulse does is fork early
 
25
# and then block on a write to a socket. So Upstart thinks that
 
26
# it has started while Pulse is still initializing. This stops
 
27
# the started event from happening until the dbus-socket is ready
 
28
# for people to connect to it.
 
29
post-start script
 
30
        while true; do
 
31
                [ -S /run/user/`id -u`/pulse/dbus-socket ] && break
 
32
                sleep 0.1
 
33
        done
 
34
end script