SoundPlay: Play and exit
Posted on September 9th, 1997 by shacker
If you want to play a sound at shutdown, you can feed a file to SoundPlay with something like:
/boot/apps/SoundPlay-3.4/SoundPlay /boot/home/Desktop/a.wav &
The problem with this technique is that even with the &, SoundPlay itself will not exit when it’s done playing the track. That’s why SoundPlay has the (undocumented) „-x“ option:
SoundPlay -x file.mp3
will play the given file and exit when it’s finished. To have this happen at every shutdown, just add the line to /boot/home/config/boot/UserShutdownScript
.