Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17890
Modified Files: Tag: desiredata s_audio_alsa.c Log Message: new audio api
Index: s_audio_alsa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsa.c,v retrieving revision 1.5.4.5.2.2.2.5 retrieving revision 1.5.4.5.2.2.2.6 diff -C2 -d -r1.5.4.5.2.2.2.5 -r1.5.4.5.2.2.2.6 *** s_audio_alsa.c 30 Jun 2007 15:32:20 -0000 1.5.4.5.2.2.2.5 --- s_audio_alsa.c 30 Jun 2007 20:22:38 -0000 1.5.4.5.2.2.2.6 *************** *** 36,40 **** #endif
! static void alsa_checkiosync( void); static void alsa_numbertoname(int iodev, char *devname, int nchar); static int alsa_jittermax; --- 36,41 ---- #endif
! //static void alsa_close_audio(void); ! static void alsa_checkiosync(void); static void alsa_numbertoname(int iodev, char *devname, int nchar); static int alsa_jittermax; *************** *** 186,190 **** int alsa_open_audio( int naudioindev, int * audioindev, int nchindev, int * chindev, ! int naudiooutdev, int *audiooutdev, int nchoutdev, int *choutdev, int rate) { int err, inchans = 0, outchans = 0; char devname[512]; --- 187,191 ---- int alsa_open_audio( int naudioindev, int * audioindev, int nchindev, int * chindev, ! int naudiooutdev, int *audiooutdev, int nchoutdev, int *choutdev, int rate/*, int dummy*/) { int err, inchans = 0, outchans = 0; char devname[512]; *************** *** 692,696 **** desc = strdup("???"); } - fprintf(stderr, "name: %s\n", desc); sprintf(indevlist + 2*ndev * devdescsize, "%s (hardware)", desc); sprintf(indevlist + (2*ndev+1) * devdescsize, "%s (plug-in)", desc); --- 693,696 ---- *************** *** 701,709 **** } for (i = 0, j = 2*ndev; i < alsa_nnames; i++, j++) { ! if (j >= maxndev) ! break; ! snprintf(indevlist + j * devdescsize, devdescsize, "%s", ! alsa_names[i]); } *nindevs = *noutdevs = j; } --- 701,714 ---- } for (i = 0, j = 2*ndev; i < alsa_nnames; i++, j++) { ! if (j >= maxndev) break; ! snprintf(indevlist + j * devdescsize, devdescsize, "%s", alsa_names[i]); } *nindevs = *noutdevs = j; } + + struct t_audioapi alsa_api = { + alsa_open_audio, + alsa_close_audio, + alsa_send_dacs, + alsa_getdevs, + };