Updated ALSA hint

Japie japie at nospam.org
Sun Jan 19 04:08:01 PST 2003


On Thu, 16 Jan 2003 11:38:10 +0100, alex wrote:

> Hi, there!
> 
> Here comes my updated ALSA hint. I found out how to use timidity as a
> midi client for alsa9. It works great!
> 
> Alex

How about this:

#!/bin/sh
# Begin $rc_base/init.d/alsa

# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
# ALSA specific parts by Mark Hymers - markh at linuxfromscratch.org

source /etc/sysconfig/rc
source $rc_functions

if [ -f /etc/sysconfig/alsa ]
then
        source /etc/sysconfig/alsa
fi

if [ -z "$CONF" ] 
then
        echo "Please create an /etc/sysconfig/alsa file containing"
        echo "a CONF value (usually /etc/asound.conf)"
        exit 1;
fi
case "$1" in
        start)
                echo -n "Starting alsa...    Restoring volumes..."
                loadproc /usr/sbin/alsactl -f $CONF restore
		echo -n "                    Starting MIDI sequencer..."
		/usr/bin/timidity -iA -B2,8 -Os > /dev/null&
                ;;

        stop)
                echo -n "Stopping alsa...    Saving volumes......"
                loadproc /usr/sbin/alsactl -f $CONF store
                echo -n "            Stopping MIDI sequencer.........."
                killall timidity
                ;;

        restart)
                $0 stop
                /usr/bin/sleep 1
                $0 start
                ;;
        
        *)
                echo "Usage: $0 {start|stop|restart}"
                exit 1
                ;;

esac

# End $rc_base/init.d/alsa
-- 
Groetjes Japie
http://japie.is.dreaming.org

Linux 2.4.20-wolk4.0s-pre7 i686
LFS-3.3

In most countries selling harmful things like drugs is punishable.
Then howcome people can sell Microsoft software and go unpunished?
;^)
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list