The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

SoundPlay: Play and exit

Contributed by: Marco Nelissen
This tip is valid for: Both BeOS and Haiku

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.

Posted in Applications

(comments are closed).