Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10507/pd/src
Modified Files: Tag: stable_0_38 s_audio_alsa.c s_audio_pablio.c s_main.c Log Message: Fixed alsa bug in 0.38-3.
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.9.2.4 retrieving revision 1.9.2.5 diff -C2 -d -r1.9.2.4 -r1.9.2.5 *** s_main.c 21 Feb 2005 04:20:20 -0000 1.9.2.4 --- s_main.c 24 Feb 2005 01:37:20 -0000 1.9.2.5 *************** *** 8,12 **** */
! char pd_version[] = "Pd version 0.38.3\n"; char pd_compiletime[] = __TIME__; char pd_compiledate[] = __DATE__; --- 8,12 ---- */
! char pd_version[] = "Pd version 0.38.4\n"; char pd_compiletime[] = __TIME__; char pd_compiledate[] = __DATE__;
Index: s_audio_alsa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsa.c,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** s_audio_alsa.c 21 Feb 2005 04:20:20 -0000 1.6.2.1 --- s_audio_alsa.c 24 Feb 2005 01:37:20 -0000 1.6.2.2 *************** *** 73,83 **** return (0); } - err1 = snd_pcm_hw_params_set_access(dev->a_handle, - hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED); - err2 = snd_pcm_hw_params_set_access(dev->a_handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED); post("err 1 %d (%s), err2 %d (%s)", err1, snd_strerror(err1), err2, snd_strerror(err2)); return ((err1 < 0) && (err2 >= 0)); } --- 73,88 ---- return (0); } err1 = snd_pcm_hw_params_set_access(dev->a_handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED); + if (err1 < 0) + { + err2 = snd_pcm_hw_params_set_access(dev->a_handle, + hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED); + } + else err2 = -1; + #if 0 post("err 1 %d (%s), err2 %d (%s)", err1, snd_strerror(err1), err2, snd_strerror(err2)); + #endif return ((err1 < 0) && (err2 >= 0)); }