Fri, Oct 02, 2009 at 02:33:27PM -0700, Buzzer may have written:
> pO DANNYM RADIOPEREHWATA OT 2-Oct-2009 07:18, Paul de Weerd
> BYL ZAME^EN W \FIRE, NA ^ASTOTE misc, S TAKIM SOOB]ENIEM:
>
> > | > > I need to play a few audio files simultaneously.
> > | >
> > | > > can't open /dev/audio: Device busy.
> > | >
> > | > man 1 aucat
> > |
> > | Could you be more verbose? What make you think that I did not read man
> > | aucat?
> >
> > tried aucat. Mine seems to be misfunctioning too, can you share with
> > the list what problems you had with aucat in servermode ? Did it give
> > any errormessages ?
>
> I ran aucat with '-l' key, then I try to play wav file with 'aucat
> file.wav' command or 'aucat -s deafault file.wav'.
>
> aucat -s default send.wav
> aucat: can't open /dev/audio: Device busy
> aucat: send.wav: could not play
[ snip ]
The "LEGACY MODE" section of aucat(1) says that if neither -i nor -o are
given, aucat falls back to legacy mode; legacy mode wants to open the
device directly rather than going through the "aucat -l" server. Use the
'-i' flag.
I start "aucat -l" in my .xsession and have both gkrellm's mail checker
and psi configured to use the following helper script to play event
sounds. These event sounds mix into the music stream from mpd just fine.
------------------------------------------------------------------------------
#!/bin/ksh
# @(#)~clamat/bin/playsound -- Dump sound file to /dev/audio
##############################################################################
# aucat needs the file extension to figure out what parameters to set; if
# the file is a symbolic link, figure out the real name and give that to
# aucat so it can see the real extension (e.g. for my $HOME/sound/startup
# symbolic link that can point to .wav or .au file)
FILE="$1"
[[ -h $1 && -x /usr/bin/readlink ]] && FILE=$(/usr/bin/readlink -f "$FILE")
# If file exists and is not empty, send to sound card.
#
[[ -s $FILE ]] && exec /usr/bin/aucat -i "$FILE"
------------------------------------------------------------------------------
--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it. -- Kernighan
-- quoted by Quentyn Taylor