Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4038
Modified Files: Tag: devel_0_38 s_audio_asio.cpp Log Message: thread safety
Index: s_audio_asio.cpp =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/s_audio_asio.cpp,v retrieving revision 1.1.4.23 retrieving revision 1.1.4.24 diff -C2 -d -r1.1.4.23 -r1.1.4.24 *** s_audio_asio.cpp 18 Jan 2005 20:15:04 -0000 1.1.4.23 --- s_audio_asio.cpp 11 May 2005 12:35:27 -0000 1.1.4.24 *************** *** 779,782 **** --- 779,784 ---- /* perform the processing */
+ sys_lock(); + for (long i = 0; i < sys_outchannels + sys_inchannels; i++) { *************** *** 797,804 ****
pthread_cond_broadcast(&asio_ringbuf_cond); ! if(asio_useoutputready) ASIOOutputReady(); ! return 0L; /* time info!!! */ } --- 799,808 ----
pthread_cond_broadcast(&asio_ringbuf_cond); ! ! sys_unlock(); ! if(asio_useoutputready) ASIOOutputReady(); ! return 0L; /* time info!!! */ } *************** *** 1280,1284 **** /* perform the processing */ ! sys_lock();
for (int j = 0; j != asio_ticks_per_callback; j++) --- 1284,1292 ---- /* perform the processing */ ! int timeout = sys_dacblocksize * (float)asio_ticks_per_callback / (float) sys_dacsr * 1e6; ! ! if (sys_timedlock(timeout) == ETIMEDOUT) ! /* we're late ... lets hope that jack doesn't kick us out */ ! return 0;
for (int j = 0; j != asio_ticks_per_callback; j++)