Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21903
Modified Files: Tag: devel_0_38 s_audio_jack.c s_stuff.h Log Message: better error reporting
Index: s_audio_jack.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_jack.c,v retrieving revision 1.5.4.7 retrieving revision 1.5.4.8 diff -C2 -d -r1.5.4.7 -r1.5.4.8 *** s_audio_jack.c 17 Apr 2005 10:23:56 -0000 1.5.4.7 --- s_audio_jack.c 13 May 2005 17:01:48 -0000 1.5.4.8 *************** *** 86,95 **** { int i,j; ! int timeout = (float)nframes / (float) sys_dacsr * 1e6; if (sys_timedlock(timeout) == ETIMEDOUT) /* we're late ... lets hope that jack doesn't kick us out */ return 0; ! for (i = 0; i != dspticks_per_jacktick; ++i) { --- 86,101 ---- { int i,j; ! int timeout = nframes * 1e6 / sys_dacsr; if (sys_timedlock(timeout) == ETIMEDOUT) /* we're late ... lets hope that jack doesn't kick us out */ + { + static int k = 0; + post("timeout %d", timeout); + + sys_log_error(ERR_SYSLOCK); return 0; ! } ! for (i = 0; i != dspticks_per_jacktick; ++i) { *************** *** 157,160 **** --- 163,167 ---- static int jack_xrun(void* arg) { jack_dio_error = 1; + sys_log_error(ERR_XRUN); return 0; } *************** *** 420,427 ****
{ ! jack_deactivate(jack_client); ! jack_started = 0; ! jack_client_close(jack_client); ! jack_client = NULL; }
--- 427,437 ----
{ ! if (jack_client) ! { ! jack_deactivate(jack_client); ! jack_started = 0; ! jack_client_close(jack_client); ! jack_client = NULL; ! } }
Index: s_stuff.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v retrieving revision 1.5.4.7 retrieving revision 1.5.4.8 diff -C2 -d -r1.5.4.7 -r1.5.4.8 *** s_stuff.h 11 May 2005 15:28:08 -0000 1.5.4.7 --- s_stuff.h 13 May 2005 17:01:48 -0000 1.5.4.8 *************** *** 128,131 **** --- 128,133 ---- #define ERR_RESYNC 3 #define ERR_DATALATE 4 + #define ERR_XRUN 5 + #define ERR_SYSLOCK 6 void sched_set_using_dacs(int flag);