Re: Procmailrc to play sound async when message arrives
On Tue, Sep 23, 2003 at 02:22:28AM -0400, kmark@pipeline.com wrote:
>
>
> On Mon, 22 Sep 2003 tb.nospam@comcast.net wrote:
> <snip>
> >
> > so unless anybody has a better already written sound buffer mixer to
> > recommend, consider this matter closed.
> >
> > Thanks for your attention.
> > -T
> >
> I had a sugguestion. have a lock file. so, if your script is about to play
> a new sound, it check to see if a sound is being played. It will then not
> play/queue up a new sound. So, one long tone will play.
> Does this make sense?
> -Kev
Thanks. Lockfile was the answer. I was able to do it in bash.
Pseudocode:
[Make a .RAW copy of the .WAV. Get lock. First time, record name of
.WAV. Or else, record name of .RAW. Invoke 2nd script async. Release
lock.
2nd script: Sleep 2 seconds. Get lock. Cat files to bplay async.
Clear list of files. Release lock.]
It ends up making a rapid-fire series of clicks, once per mail.
I have another question: Can Procmail fire a single script when it's
done processing *ALL* mails? I could simplify things if that's
possible.
Whew!
-Tom
Reply to: