Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8375
Modified Files: Tag: desiredata s_audio.c Log Message: new audio api
Index: s_audio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v retrieving revision 1.5.4.16.2.20.2.8 retrieving revision 1.5.4.16.2.20.2.9 diff -C2 -d -r1.5.4.16.2.20.2.8 -r1.5.4.16.2.20.2.9 *** s_audio.c 28 Jun 2007 06:21:23 -0000 1.5.4.16.2.20.2.8 --- s_audio.c 30 Jun 2007 21:23:41 -0000 1.5.4.16.2.20.2.9 *************** *** 29,33 **** #define MAXNDEV 100 #define DEVDESCSIZE 80 ! static void audio_getdevs(char *indevlist, int *nindevs, char *outdevlist, int *noutdevs, int *canmulti, --- 29,63 ---- #define MAXNDEV 100 #define DEVDESCSIZE 80 ! ! extern t_audioapi pa_api, jack_api, oss_api, alsa_api, sgi_api, mmio_api, asio_api; ! ! static t_audioapi *sys_audio(void) { ! #ifdef USEAPI_PORTAUDIO ! if (sys_audioapi == API_PORTAUDIO) return &pa_api; ! #endif ! #ifdef USEAPI_JACK ! if (sys_audioapi == API_JACK) return &jack_api; ! #endif ! #ifdef USEAPI_OSS ! if (sys_audioapi == API_OSS) return &oss_api; ! #endif ! #ifdef USEAPI_ALSA ! if (sys_audioapi == API_ALSA) return &alsa_api; ! #endif ! #ifdef USEAPI_SGI ! if (sys_audioapi == API_SGI) return &sgi_api; ! #endif ! #ifdef USEAPI_MMIO ! if (sys_audioapi == API_MMIO) return &mmio_api; ! #endif ! #ifdef USEAPI_ASIO ! if (sys_audioapi == API_ASIO) return &asio_api; ! #endif ! post("sys_close_audio: unknown API %d", sys_audioapi); ! sys_inchannels = sys_outchannels = 0; ! sched_set_using_dacs(0); /* tb: dsp is switched off */ ! return 0; ! } ! static void audio_getdevs(char *indevlist, int *nindevs, char *outdevlist, int *noutdevs, int *canmulti, *************** *** 354,379 **** /* } jsarlo */ if (!audio_isopen()) return; ! #ifdef USEAPI_PORTAUDIO ! if (sys_audioapi == API_PORTAUDIO) pa_close_audio(); else ! #endif ! #ifdef USEAPI_JACK ! if (sys_audioapi == API_JACK) jack_close_audio(); else ! #endif ! #ifdef USEAPI_OSS ! if (sys_audioapi == API_OSS) oss_close_audio(); else ! #endif ! #ifdef USEAPI_ALSA ! if (sys_audioapi == API_ALSA) alsa_close_audio(); else ! #endif ! #ifdef USEAPI_SGI ! if (sys_audioapi == API_SGI) sgi_close_audio(); else ! #endif ! #ifdef USEAPI_MMIO ! if (sys_audioapi == API_MMIO) mmio_close_audio(); else ! #endif ! #ifdef USEAPI_ASIO ! if (sys_audioapi == API_ASIO) asio_close_audio(); else ! #endif ! post("sys_close_audio: unknown API %d", sys_audioapi); sys_inchannels = sys_outchannels = 0; sched_set_using_dacs(0); /* tb: dsp is switched off */ --- 384,389 ---- /* } jsarlo */ if (!audio_isopen()) return; ! if (sys_audio()) sys_audio()->close_audio(); ! else post("sys_close_audio: unknown API %d", sys_audioapi); sys_inchannels = sys_outchannels = 0; sched_set_using_dacs(0); /* tb: dsp is switched off */