4

In a script I play a sound ( .ogg file) using /usr/bin/play. The sound is played fine, but there is an annoying delay of a couple of seconds after the sound has been played before the program (play) terminates. Why is that, and can it be fixed?

The script is a git-commit hook. It just calls play -q filename.ogg. I have the same experience from the command line.

I'm on 10.04 if that’s relevant.

2 Answers 2

2

There's no need to wait for the sound to be completed, right? So you could just

play file.ogg </dev/null &>/dev/null &

(or look here for more intense detaching). Also try ogg123 or mplayer instead of play, or try a different audio output.

0
0

I would attribute that to the time it takes for the application to shut down. It really depends how you wrote the script.

This might be more of scripting issue than a ubuntu one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .