I\'m working through a chapter about iPhone audio and have come across a section of code that I can\'t make sense of:
while (aqc.playPtr < aqc.sampleLen)
The real reason to use 'select' instead of 'sleep' is the accuracy of sleep, especially the audio or video playback. Use 'select' can get higher precision time interval for sleeping on linux or windows or other OS than 'sleep'.
I am surprised that many people actually don't know why. And please stop to shame on the programmer / write of such a code.