[Pkg-alsa-devel] Bug#318219: And the patch...
Paul TBBle Hampson
Paul TBBle Hampson <Paul.Hampson@anu.edu.au>, 318219@bugs.debian.org
Thu Jul 14 09:10:40 UTC 2005
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
(Thankyou Thomas Hood for pointing out my glaring error)
--- alsa.dpkg-dist 2005-06-09 05:23:01.000000000 +1000
+++ alsa 2005-06-21 02:47:52.000000000 +1000
@@ -125,6 +125,20 @@
return $SMLIA_RETURNSTATUS
}
=20
+start_timidity_if_allowed()
+{
+ if [ "$autorun_timidity" =3D "true" ] ; then
+ executable_or_warn timidity || return 1
+ modprobe snd-seq || true
+ timidity -iA -B2,8 -Os -q0/0 -k0 --background
+ fi
+}
+
+stop_timidity_if_running()
+{
+ kill `pgrep -f "timidity -iA -B2,8 -Os -q0/0 -k0 --background"` || true
+}
+
echo_card_indices()
{
if [ -f /proc/asound/cards ] ; then
@@ -303,6 +317,7 @@
sanify_levels all || START_RETURNSTATUS=3D1
restore_levels all || :
fi
+ start_timidity_if_allowed
#log_end_msg $START_RETURNSTATUS
case "$START_RETURNSTATUS" in
0) echo "done." ;;
@@ -339,6 +354,7 @@
#log_end_msg $STOP_RETURNSTATUS
return $STOP_RETURNSTATUS
fi
+ stop_timidity_if_running
store_levels_if_allowed "all-autosaving-once" || STOP_RETURNSTATUS=3D1
mute_and_zero_levels all || STOP_RETURNSTATUS=3D1
#log_end_msg $STOP_RETURNSTATUS
@@ -395,6 +411,7 @@
=20
kill_procs_using_sound()
{
+ stop_timidity_if_running
procs_using_sound=3D"$(echo_procs_using_sound)"
if [ "$procs_using_sound" ] ; then
echo -n "Terminating processes:"
@@ -506,6 +523,7 @@
0) echo "." ;;
*) echo " (failed)." ;;
esac
+ start_timidity_if_allowed
return $LUM_RETURNSTATUS
}
=20
--=20
Paul "TBBle" Hampson, Paul.Hampson@Anu.edu.au
7th year CompSci/Asian Studies student, ANU
Shorter .sig for a more eco-friendly paperless office.
--7JfCtLOvnd9MIVvH
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC1iwQexDuohKLFuARAqEIAJkB8bb8sB7x5nOFV3itNq+Z1eez8gCghxIv
rpz6N+7Vgg0SrWomxHHXW+M=
=nKTv
-----END PGP SIGNATURE-----
--7JfCtLOvnd9MIVvH--
More information about the Pkg-alsa-devel
mailing list