Re: Networked sound
On Friday 08 July 2005 15:58, Hugo Vanwoerkom wrote:
>
> http://radscan.com/nas.html
>
> HTH
> H
This was helpful. I got it to work. Thanks.
A problem arose: If I want audio coming out of my laptop rather than from my
server, I will need to alter the variable AUDIOSERVER. At first, that
variable was only modified in .bashrc, but I wasn't satisfied: I wanted to be
able to alter the currently used audioserver on-the-fly and not only on
re-login.
So I went and hacked this together.
# ! /bin/bash
# This is distributed under the GNU General Public License. I am Anders
Breindahl, and may be reached at skrewz@skrewz.dk.
if [ -f ~/scripts/determine-audioserver ]; then
export AUDIOSERVER="$(sh ~/scripts/determine-audioserver)"
else
export AUDIOSERVER="tcp/$(hostname):8000"
fi
if [ "$1" == "mplayer" ]; then
$@
elif [ "$1" == "auplay" ]; then
$@
else
audiooss $@
fi
Now, the output of my script determine-audioserver (which quickly tests for a
soundserver using auinfo) is assigned at program start. Therefore, if I
launch all audio-applications through this wrapper, I may change where sound
goes at program start, rather than at reboot. A bit more useful.
Regards, and thanks again, Anders Breindahl.
Reply to: