Error: AudioQueueStart failed (-66681)
I'm trying to write a simple background process whose sole purpose is to wake up every 20 seconds and play a 0.1-second AIFF of silence. This is to keep the sound chip awake; otherwise my KeyClicks are sometimes delayed.
KeepSoundAlive.sh
==============
#!/bin/sh
while [ 1 ]
do
afplay /Users/chap/Library/Sounds/quiet.aiff
sleep 20
done
It works for a while -- sometimes 8 to 12 hours -- but eventually I begin seeing these messages in the system log:
2011-07-23 09:46:07.729 afplay[32036:707] AQMEIO_Base::DoStartIO: timeout
2011-07-23 09:46:08.019 afplay[32036:707] AQMEDevice::StartIO: error -66681
Error: AudioQueueStart failed (-66681)
At this point it has stopped playing the "silent sound", and I've noticed that youtube videos also have no sound. The only way I've found to clear up the problem is to restart the Mac.
Any ideas what's going on? (This 10.7)
Thanks,
Chap
2.4GHz MacBook Pro, Mac OS X (10.6)