Update of /cvsroot/pure-data/pd/portaudio/pa_asio In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12672/pd/portaudio/pa_asio
Modified Files: pa_asio.cpp Log Message: FFT package selection
Zmoelnig's multi-'$' patch
big-soundfile support
Patch to set open directories (openpanel, savepanel)
patch to allow funny characters in extern names
fixed makefile.in to support intel mac
Index: pa_asio.cpp =================================================================== RCS file: /cvsroot/pure-data/pd/portaudio/pa_asio/pa_asio.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pa_asio.cpp 30 May 2005 03:04:07 -0000 1.9 --- pa_asio.cpp 3 Jun 2006 19:13:06 -0000 1.10 *************** *** 1082,1085 **** --- 1082,1105 ---- for( i=0; i < driverCount; ++i ) { + + PA_DEBUG(("ASIO names[%d]:%s\n",i,names[i])); + + // Since portaudio opens ALL ASIO drivers, and no one else does that, + // we face fact that some drivers were not meant for it, drivers which act + // like shells on top of REAL drivers, for instance. + // so we get duplicate handles, locks and other problems. + // so lets NOT try to load any such wrappers. + // The ones i [davidv] know of so far are: + + if ( strcmp (names[i],"ASIO DirectX Full Duplex Driver") == 0 + || strcmp (names[i],"ASIO Multimedia Driver") == 0 + || strncmp(names[i],"Premiere",8) == 0 //"Premiere Elements Windows Sound 1.0" + || strncmp(names[i],"Adobe",5) == 0 ) //"Adobe Default Windows Sound 1.5" + { + PA_DEBUG(("BLACKLISTED!!!\n")); + continue; + } + + /* Attempt to load the asio driver... */ if( LoadAsioDriver( names[i], &paAsioDriverInfo, asioHostApi->systemSpecific ) == paNoError ) *************** *** 1734,1747 **** }
! PA_DEBUG(("before ASIOSetSampleRate(%f)\n",sampleRate)); ! asioError = ASIOSetSampleRate( sampleRate ); ! /* Set sample rate */ if( asioError != ASE_OK ) { result = paInvalidSampleRate; ! PA_DEBUG(("ERROR: ASIOSetSampleRate: %s\n", PaAsio_GetAsioErrorText(asioError) )); goto error; } ! PA_DEBUG(("after ASIOSetSampleRate(%f)\n",sampleRate)); /* IMPLEMENT ME: --- 1754,1803 ---- }
! ! // check that the device supports the requested sample rate ! ! asioError = ASIOCanSampleRate( sampleRate ); ! PA_DEBUG(("ASIOCanSampleRate(%f):%d\n",sampleRate, asioError )); ! if( asioError != ASE_OK ) { result = paInvalidSampleRate; ! PA_DEBUG(("ERROR: ASIOCanSampleRate: %s\n", PaAsio_GetAsioErrorText(asioError) )); goto error; } ! ! ! // retrieve the current sample rate, we only change to the requested ! // sample rate if the device is not already in that rate. ! ! ASIOSampleRate oldRate; ! asioError = ASIOGetSampleRate(&oldRate); ! if( asioError != ASE_OK ) ! { ! result = paInvalidSampleRate; ! PA_DEBUG(("ERROR: ASIOGetSampleRate: %s\n", PaAsio_GetAsioErrorText(asioError) )); ! goto error; ! } ! PA_DEBUG(("ASIOGetSampleRate:%f\n",oldRate)); ! ! if (oldRate != sampleRate){ ! ! PA_DEBUG(("before ASIOSetSampleRate(%f)\n",sampleRate)); ! asioError = ASIOSetSampleRate( sampleRate ); ! /* Set sample rate */ ! if( asioError != ASE_OK ) ! { ! result = paInvalidSampleRate; ! PA_DEBUG(("ERROR: ASIOSetSampleRate: %s\n", PaAsio_GetAsioErrorText(asioError) )); ! goto error; ! } ! PA_DEBUG(("after ASIOSetSampleRate(%f)\n",sampleRate)); ! } ! else ! { ! PA_DEBUG(("No Need to change SR\n")); ! } ! ! /* IMPLEMENT ME: *************** *** 2036,2039 **** --- 2092,2096 ----
error: + PA_DEBUG(("goto errored\n")); if( stream ) {