You can buy external harddisks with an auto spin down mechanism which is a very useful feature. These harddisks go to sleep after a few seconds of being idle and wake up if there is a file request. In the usual day-to-day work this is exactly what you want because it keeps the harddisk cool and saves power. But you may run into trouble if you want to stream something from such a harddisk.
Problems occur when you use iTunes to listen to music which is streaming from such a harddisk. After a few seconds of listening to a song you get a break because the harddisk has to wake up to deliver the next bits and bytes to iTunes. And this goes on and on every time iTunes requests new data because its buffer is empty.
There may be better solutions than writing new software for this kind of problem. You probably may use a cron job, a different music player, buy a new harddisk or...SleeplessHD is one solution for this kind of problem. Try it! It is free and has this fancy smoking Dock icon animation which is made with Particle Beamer a not yet released inhouse application!