padsp should only route sound through pulseaudio if it is running

Bug #269939 reported by Duncan Hawthorne
2
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: pulseaudio

currently the padsp program has:

if [ x"$LD_PRELOAD" = x ] ; then
   LD_PRELOAD="libpulsedsp.so"
else
   LD_PRELOAD="$LD_PRELOAD libpulsedsp.so"
fi
export LD_PRELOAD
exec "$@"

it should really do:
if ps ax | grep -v grep | grep pulseaudio > /dev/null; then
    if [ x"$LD_PRELOAD" = x ] ; then
       LD_PRELOAD="libpulsedsp.so"
    else
       LD_PRELOAD="$LD_PRELOAD libpulsedsp.so"
    fi
fi
export LD_PRELOAD
exec "$@"

or with whatever test you want to use to see if pulse is running. This means applications can then actually have padsp in the exec line of .desktop files, and will work with pulse running, and without. the variations of ubuntu would all have to make sure that the padsp file is always available (ie always install pulseaudio-utils)

Alternatively, you could make another script not part of the pulseaudio package which optionally runs padsp if and only if pulseaudio is running. ie a script called padsp1, run as "padsp1 application" and containing:

if ps ax | grep -v grep | grep pulseaudio > /dev/null; then
    exec "padsp $@"
else
    exec "$@"
fi

Daniel T Chen (crimsun)
Changed in pulseaudio:
importance: Undecided → Wishlist
status: New → Incomplete
Daniel T Chen (crimsun)
Changed in pulseaudio:
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.14-0ubuntu2

---------------
pulseaudio (0.9.14-0ubuntu2) jaunty; urgency=low

  * Add fixes from trunk:
    - 0012_clarify_driver_error_redirect_to_alsa_devs.patch
  * Add 0013_add_padsp_wrapper_check.patch (LP: #269939)
  * debian/pulseaudio.manpages:
    debian/pulseaudio-esound-compat.manpages:
    debian/pulseaudio-utils.links:
    - Install upstream man pages (LP: #219669, #318660),
    - Link to pacat for parec man page (LP: #294628)

 -- Daniel T Chen <email address hidden> Thu, 22 Jan 2009 02:57:54 -0500

Changed in pulseaudio:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.