Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21121
Modified Files: Tag: devel_0_38 s_audio_asio.cpp Log Message: some better debug messages
Index: s_audio_asio.cpp =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/s_audio_asio.cpp,v retrieving revision 1.1.4.15 retrieving revision 1.1.4.16 diff -C2 -d -r1.1.4.15 -r1.1.4.16 *** s_audio_asio.cpp 23 Nov 2004 23:08:53 -0000 1.1.4.15 --- s_audio_asio.cpp 25 Nov 2004 23:13:24 -0000 1.1.4.16 *************** *** 7,10 **** --- 7,12 ---- */
+ #define CALLBACK_SCHEDULER + #ifdef USEAPI_ASIO
*************** *** 148,151 **** --- 150,154 ----
static long asio_bufsize; /* hardware buffer size */ + static long asio_ticks_per_callback;
unsigned long sys_reftime; *************** *** 296,310 ****
/* todo: buffer size hardcoded to asio hardware */ ! asio_bufsize = asio_prefbufsize;
#ifdef CALLBACK_SCHEDULER ! if (asio_bufsize % 2 == 0) { /* use callback scheduler */ sys_keepsched = 0; sys_callbackscheduler = 1; } #endif ! /* set sample rate */ if(ASIOCanSampleRate( asio_srate ) != ASE_OK) --- 299,318 ----
/* todo: buffer size hardcoded to asio hardware */ ! asio_bufsize = asio_maxbufsize;
#ifdef CALLBACK_SCHEDULER ! if ( asio_bufsize % sys_dacblocksize == 0 ) { /* use callback scheduler */ sys_keepsched = 0; sys_callbackscheduler = 1; + asio_ticks_per_callback = asio_bufsize / sys_dacblocksize; + post("ASIO: using callback-based scheduler"); } + else + post("ASIO: using traditional scheduler"); #endif ! ! /* set sample rate */ if(ASIOCanSampleRate( asio_srate ) != ASE_OK) *************** *** 395,400 **** ASIOGetChannelInfo(&asio_channelinfo[i]);
! if (i < sys_outchannels) { ! asio_converter[i] = asio_converter_send(asio_channelinfo[i].type); asio_out_samplewidth[i] = asio_samplewidth(asio_channelinfo[i].type); } --- 403,413 ---- ASIOGetChannelInfo(&asio_channelinfo[i]);
! #ifdef ASIODEBUG ! post("ASIO: channel %d type %d", i, asio_channelinfo[i].type); ! #endif ! ! if (i < sys_outchannels) ! { ! asio_converter[i] = asio_converter_send(asio_channelinfo[i].type); asio_out_samplewidth[i] = asio_samplewidth(asio_channelinfo[i].type); } *************** *** 604,607 **** --- 617,621 ---- return SENDDACS_NO; } + #endif
*************** *** 700,703 **** --- 714,726 ---- { ASIOTime time; + #ifdef ASIODEBUG + static int written = 0; + if(written == 0) + { + post("ASIO: asio_bufferSwitch_cb"); + written = 1; + } + #endif + memset (&time, 0, sizeof (time)); /* todo: do we need to syncronize with other media ??? */ *************** *** 1228,1231 **** --- 1251,1263 ---- { ASIOTime time; + #ifdef ASIODEBUG + static int written = 0; + if(written == 0) + { + post("ASIO: asio_bufferSwitch_cb"); + written = 1; + } + #endif + memset (&time, 0, sizeof (time)); /* todo: do we need to syncronize with other media ??? */ *************** *** 1255,1259 **** sys_lock(); ! for (int j = 0; j < asio_bufsize; j += sys_dacblocksize) { /* get sounds from input channels */ --- 1287,1291 ---- sys_lock(); ! for (int j = 0; j != asio_ticks_per_callback; j++) { /* get sounds from input channels */