Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18458
Modified Files: Tag: desiredata s_audio.c Log Message: variable length device lists
Index: s_audio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v retrieving revision 1.5.4.16.2.20.2.15 retrieving revision 1.5.4.16.2.20.2.16 diff -C2 -d -r1.5.4.16.2.20.2.15 -r1.5.4.16.2.20.2.16 *** s_audio.c 9 Jul 2007 21:07:37 -0000 1.5.4.16.2.20.2.15 --- s_audio.c 9 Jul 2007 22:04:03 -0000 1.5.4.16.2.20.2.16 *************** *** 469,494 **** sys_get_audio_params(&naudioindev, audioindev, chindev, &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance, &scheduler); - /* post("naudioindev %d naudiooutdev %d longform %f", - naudioindev, naudiooutdev, flongform); */ if (naudioindev > 1 || naudiooutdev > 1) flongform = 1; ! audioindev1 = (naudioindev > 0 && audioindev[0]>= 0 ? audioindev[0] : 0); ! audioindev2 = (naudioindev > 1 && audioindev[1]>= 0 ? audioindev[1] : 0); ! audioindev3 = (naudioindev > 2 && audioindev[2]>= 0 ? audioindev[2] : 0); ! audioindev4 = (naudioindev > 3 && audioindev[3]>= 0 ? audioindev[3] : 0); ! audioinchan1 = (naudioindev > 0 ? chindev[0] : 0); ! audioinchan2 = (naudioindev > 1 ? chindev[1] : 0); ! audioinchan3 = (naudioindev > 2 ? chindev[2] : 0); ! audioinchan4 = (naudioindev > 3 ? chindev[3] : 0); ! audiooutdev1 = (naudiooutdev > 0 && audiooutdev[0]>=0 ? audiooutdev[0] : 0); ! audiooutdev2 = (naudiooutdev > 1 && audiooutdev[1]>=0 ? audiooutdev[1] : 0); ! audiooutdev3 = (naudiooutdev > 2 && audiooutdev[2]>=0 ? audiooutdev[2] : 0); ! audiooutdev4 = (naudiooutdev > 3 && audiooutdev[3]>=0 ? audiooutdev[3] : 0); ! audiooutchan1 = (naudiooutdev > 0 ? choutdev[0] : 0); ! audiooutchan2 = (naudiooutdev > 1 ? choutdev[1] : 0); ! audiooutchan3 = (naudiooutdev > 2 ? choutdev[2] : 0); ! audiooutchan4 = (naudiooutdev > 3 ? choutdev[3] : 0); ! sys_vgui("pdtk_audio_dialog %s {%d %d %d %d} {%d %d %d %d} %s {%d %d %d %d} {%d %d %d %d} %d %d %d %d %d\n", ! indevliststring.str().data(), audioindev1, audioindev2, audioindev3, audioindev4, audioinchan1, audioinchan2, audioinchan3, audioinchan4, ! outdevliststring.str().data(), audiooutdev1, audiooutdev2, audiooutdev3, audiooutdev4, audiooutchan1, audiooutchan2, audiooutchan3, audiooutchan4, rate, dacblocksize, advance, canmulti, flongform!=0); } --- 469,481 ---- sys_get_audio_params(&naudioindev, audioindev, chindev, &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance, &scheduler); if (naudioindev > 1 || naudiooutdev > 1) flongform = 1; ! std::ostringstream audioindevs; for (int i=0; i<naudioindev; i++) audioindevs << audioindev [i] << " "; ! std::ostringstream audiooutdevs; for (int i=0; i<naudiooutdev; i++) audiooutdevs << audiooutdev[i] << " "; ! std::ostringstream audioinchans; for (int i=0; i<naudioindev; i++) audioinchans << chindev [i] << " "; ! std::ostringstream audiooutchans; for (int i=0; i<naudiooutdev; i++) audiooutchans << choutdev [i] << " "; ! ! sys_vgui("pdtk_audio_dialog %s {%s} {%s} %s {%s} {%s} %d %d %d %d %d\n", ! indevliststring.str().data(), audioindevs.str().data(), audioinchans.str().data(), ! outdevliststring.str().data(), audiooutdevs.str().data(), audiooutchans.str().data(), rate, dacblocksize, advance, canmulti, flongform!=0); }