Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20033
Modified Files:
Tag: devel_0_38
s_audio.c
Log Message:
selectable callback scheduler
Index: s_audio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -C2 -d -r1.5.4.2 -r1.5.4.3
*** s_audio.c 10 Nov 2004 13:47:08 -0000 1.5.4.2
--- s_audio.c 14 Dec 2004 09:45:21 -0000 1.5.4.3
***************
*** 65,68 ****
--- 65,70 ----
static int audio_advance;
+ extern int sys_callbackscheduler;
+
static int audio_isopen(void)
{
***************
*** 75,79 ****
int *pnaudioindev, int *paudioindev, int *chindev,
int *pnaudiooutdev, int *paudiooutdev, int *choutdev,
! int *prate, int *pdacblocksize, int *padvance)
{
int i;
--- 77,81 ----
int *pnaudioindev, int *paudioindev, int *chindev,
int *pnaudiooutdev, int *paudiooutdev, int *choutdev,
! int *prate, int *pdacblocksize, int *padvance, int *pscheduler)
{
int i;
***************
*** 89,92 ****
--- 91,95 ----
*pdacblocksize = audio_dacblocksize;
*padvance = audio_advance;
+ *pscheduler = sys_callbackscheduler;
}
***************
*** 177,181 ****
void sys_open_audio(int naudioindev, int *audioindev, int nchindev,
int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
! int *choutdev, int rate, int dacblocksize, int advance, int enable)
{
int i, *ip;
--- 180,184 ----
void sys_open_audio(int naudioindev, int *audioindev, int nchindev,
int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
! int *choutdev, int rate, int dacblocksize, int advance, int schedmode, int enable)
{
int i, *ip;
***************
*** 363,367 ****
if (sys_audioapi == API_ASIO)
asio_open_audio(naudioindev, audioindev, nchindev, chindev,
! naudiooutdev, audiooutdev, nchoutdev, choutdev, rate);
else
#endif
--- 366,370 ----
if (sys_audioapi == API_ASIO)
asio_open_audio(naudioindev, audioindev, nchindev, chindev,
! naudiooutdev, audiooutdev, nchoutdev, choutdev, rate, scheduler);
else
#endif
***************
*** 434,442 ****
int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV];
int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV];
! int rate, dacblocksize, advance;
sys_get_audio_params(&naudioindev, audioindev, chindev,
! &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance);
sys_open_audio(naudioindev, audioindev, naudioindev, chindev,
! naudiooutdev, audiooutdev, naudiooutdev, choutdev, rate, dacblocksize, advance, 1);
}
--- 437,445 ----
int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV];
int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV];
! int rate, dacblocksize, advance, scheduler;
sys_get_audio_params(&naudioindev, audioindev, chindev,
! &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance, &scheduler);
sys_open_audio(naudioindev, audioindev, naudioindev, chindev,
! naudiooutdev, audiooutdev, naudiooutdev, choutdev, rate, dacblocksize, advance, scheduler, 1);
}
***************
*** 663,667 ****
audiooutdev1, audiooutdev2, audiooutdev3, audiooutdev4,
audiooutchan1, audiooutchan2, audiooutchan3, audiooutchan4;
! int rate, dacblocksize, advance;
/* these are all the devices on your system: */
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
--- 666,670 ----
audiooutdev1, audiooutdev2, audiooutdev3, audiooutdev4,
audiooutchan1, audiooutchan2, audiooutchan3, audiooutchan4;
! int rate, dacblocksize, advance, scheduler;
/* these are all the devices on your system: */
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
***************
*** 693,697 ****
sys_get_audio_params(&naudioindev, audioindev, chindev,
! &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance);
/* post("naudioindev %d naudiooutdev %d longform %f",
--- 696,700 ----
sys_get_audio_params(&naudioindev, audioindev, chindev,
! &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance, &scheduler);
/* post("naudioindev %d naudiooutdev %d longform %f",
***************
*** 746,749 ****
--- 749,753 ----
int newdacblocksize = atom_getintarg(17, argc, argv);
int newadvance = atom_getintarg(18, argc, argv);
+ int newschedmode = atom_getintarg(19, argc, argv);
int statewas;
***************
*** 782,786 ****
sys_open_audio(nindev, newaudioindev, nindev, newaudioinchan,
noutdev, newaudiooutdev, noutdev, newaudiooutchan,
! newrate, newdacblocksize, newadvance, 1);
}
--- 786,790 ----
sys_open_audio(nindev, newaudioindev, nindev, newaudioinchan,
noutdev, newaudiooutdev, noutdev, newaudiooutchan,
! newrate, newdacblocksize, newadvance, newschedmode, 1);
}