So there is some code in m_sched.c which closes the audio device. On Mac OS X, it gets triggered when the computer goes to sleep, and then Pd can't play audio any more unless you cycle the DSP or restart Pd. This is an source of confusion for newbies and annoyance for users. I don't quite understand why there is this code to close the audio device? Can I just #ifdef it out for Mac OS X?
/* on 32nd idle, start a clock watch; every 32 ensuing idles, check it */ if (idlecount == 32) idletime = sys_getrealtime(); else if (sys_getrealtime() - idletime > 1.) { post("audio I/O stuck... closing audio\n"); sys_close_audio(); sched_set_using_audio(SCHED_AUDIO_NONE); goto waitfortick; }
It also seems to get triggered a lot on Windows, but I don't know why. Perhaps this isn't really needed?
.hc
----------------------------------------------------------------------------
Programs should be written for people to read, and only incidentally for machines to execute. - from Structure and Interpretation of Computer Programs