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)
Well, sleep(3) may be implemented by using signals. It depends on the platform.
When you use select(2) and poll(2), you know that no signals will be involved, which is often very useful. For example, if you are using alarm(2), you should not use sleep(3) as well, because "mixing calls to alarm and sleep is a bad idea" (according to the man page.)
Also, select and poll give you millisecond granularity when sleeping, but sleep only has a granularity in terms of seconds.