You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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)

Posted on Jul 24, 2011 2:16 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 4, 2011 8:18 AM

Hi,

I have the same problem.

I was using Antipop 1.0.2 to stop those nasty clicks/pops that my iMac does.

In Snow Leopard worked fine, but since Lion it stoped working. After few hours running fine, it stops working.

Since that app doesn't have support anymore, I went ahead trying something by myself.

I started by putting a command in Terminal:


while : ; do afplay "/Users/myname/Library/Application Support/Nada/nada.mp3"; sleep 10; done


It works fine most of the times...but just for a while, but some other times it won't even start. It will give the same error message that you are reporting here:


User uploaded file


Then we have another problem that came with the Lion: iTunes, Quicktime (as far as I know) stop working too, after few hours. If they are open and idle, after few hours they stop working. If they are close, after few hours with the maching on, when you open iTunes or QT, they don't work.

This seems to be related with the issue you have and I also have.


When iTunes and QT work fine, the apps (or background processes) to stop clicks and pops, work fine.

When iTunes and QT are broken, the apps (or background processes) to stop clicks and pops, won't work either.


I think there is no problem with your code, my code, the app SoundStay (which I tried too), and not even with the first app a put aside, Antipop 1.0.2. I think the problem is the inability of Lion to stay "Go" to play sound (and movies) all through the time the machine is turned on.


The problem with iTunes and QT itself is popping all around the internet and I hope (a)pple give a good bath and shave to the beast for the long waited now, first Lion Update.


Please post any findings that you might get in the meantime.

I will follow this thread closely.

2 replies
Question marked as Top-ranking reply

Aug 4, 2011 8:18 AM in response to Chap Harrison

Hi,

I have the same problem.

I was using Antipop 1.0.2 to stop those nasty clicks/pops that my iMac does.

In Snow Leopard worked fine, but since Lion it stoped working. After few hours running fine, it stops working.

Since that app doesn't have support anymore, I went ahead trying something by myself.

I started by putting a command in Terminal:


while : ; do afplay "/Users/myname/Library/Application Support/Nada/nada.mp3"; sleep 10; done


It works fine most of the times...but just for a while, but some other times it won't even start. It will give the same error message that you are reporting here:


User uploaded file


Then we have another problem that came with the Lion: iTunes, Quicktime (as far as I know) stop working too, after few hours. If they are open and idle, after few hours they stop working. If they are close, after few hours with the maching on, when you open iTunes or QT, they don't work.

This seems to be related with the issue you have and I also have.


When iTunes and QT work fine, the apps (or background processes) to stop clicks and pops, work fine.

When iTunes and QT are broken, the apps (or background processes) to stop clicks and pops, won't work either.


I think there is no problem with your code, my code, the app SoundStay (which I tried too), and not even with the first app a put aside, Antipop 1.0.2. I think the problem is the inability of Lion to stay "Go" to play sound (and movies) all through the time the machine is turned on.


The problem with iTunes and QT itself is popping all around the internet and I hope (a)pple give a good bath and shave to the beast for the long waited now, first Lion Update.


Please post any findings that you might get in the meantime.

I will follow this thread closely.

Aug 4, 2011 8:46 AM in response to givemeabrake

Thanks for the corroboration. I, too, have noticed that, once afplay stops working, some other audio apps (but not all) also stop working. YouTube, for one. It appears to be system-wide; that is, logging out or switching to another user doesn't fix it. I've only found a restart to be effective.


I never tried this prior to Lion, since KeepSoundAwake, a PPC daemon, was doing the job, but from what you say it sounds like Lion may have introduced this problem. Fingers crossed for timely resolution.

Error: AudioQueueStart failed (-66681)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.