Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21110
Modified Files: Tag: devel_0_38 s_file.c Log Message: make callback scheduler selectable by user & miller's changes to 0.38-test13
Index: s_file.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_file.c,v retrieving revision 1.2.4.4 retrieving revision 1.2.4.5 diff -C2 -d -r1.2.4.4 -r1.2.4.5 *** s_file.c 11 Nov 2004 22:30:42 -0000 1.2.4.4 --- s_file.c 14 Dec 2004 09:49:48 -0000 1.2.4.5 *************** *** 153,157 **** static void sys_initloadpreferences( void) { - fprintf(stderr, "here 1\n"); }
--- 153,156 ---- *************** *** 160,182 **** HKEY hkey; DWORD bigsize = size; - char *val2 = value; LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\Pd", 0, KEY_QUERY_VALUE, &hkey); if (err != ERROR_SUCCESS) { ! fprintf(stderr, "here 3\n"); ! return (0); } err = RegQueryValueEx(hkey, key, 0, 0, value, &bigsize); if (err != ERROR_SUCCESS) { ! fprintf(stderr, "here 4\n"); ! RegCloseKey(hkey); return (0); } ! fprintf(stderr, "here 5\n"); ! if (val2 != value) ! fprintf(stderr, "string moved for registry key %s", key); ! RegCloseKey(hkey); return (1); } --- 159,175 ---- HKEY hkey; DWORD bigsize = size; LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\Pd", 0, KEY_QUERY_VALUE, &hkey); if (err != ERROR_SUCCESS) { ! return (0); } err = RegQueryValueEx(hkey, key, 0, 0, value, &bigsize); if (err != ERROR_SUCCESS) { ! RegCloseKey(hkey); return (0); } ! RegCloseKey(hkey); return (1); } *************** *** 184,188 **** static void sys_doneloadpreferences( void) { - fprintf(stderr, "here 2\n"); }
--- 177,180 ---- *************** *** 272,276 **** int nmidiindev, midiindev[MAXMIDIINDEV]; int nmidioutdev, midioutdev[MAXMIDIOUTDEV]; ! int i, rate = 0, advance = 0, dacblocksize = 0, api, nolib; char prefbuf[MAXPDSTRING], keybuf[80]; sys_initloadpreferences(); --- 264,268 ---- int nmidiindev, midiindev[MAXMIDIINDEV]; int nmidioutdev, midioutdev[MAXMIDIOUTDEV]; ! int i, rate = 0, advance = 0, dacblocksize = 0, api, nolib, scheduler; char prefbuf[MAXPDSTRING], keybuf[80]; sys_initloadpreferences(); *************** *** 318,323 **** if (sys_getpreference("dacblocksize", prefbuf, MAXPDSTRING)) sscanf(prefbuf, "%d", &dacblocksize); sys_open_audio(naudioindev, audioindev, naudioindev, chindev, ! naudiooutdev, audiooutdev, naudiooutdev, choutdev, rate, dacblocksize, advance, 0);
/* load MIDI preferences */ --- 310,317 ---- if (sys_getpreference("dacblocksize", prefbuf, MAXPDSTRING)) sscanf(prefbuf, "%d", &dacblocksize); + if (sys_getpreference("scheduler", prefbuf, MAXPDSTRING)) + sscanf(prefbuf, "%d", &scheduler); sys_open_audio(naudioindev, audioindev, naudioindev, chindev, ! naudiooutdev, audiooutdev, naudiooutdev, choutdev, rate, dacblocksize, advance, scheduler, 0);
/* load MIDI preferences */ *************** *** 389,393 **** int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV]; int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV]; ! int i, rate, dacblocksize, advance; char buf1[MAXPDSTRING], buf2[MAXPDSTRING]; int nmidiindev, midiindev[MAXMIDIINDEV]; --- 383,387 ---- int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV]; int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV]; ! int i, rate, dacblocksize, advance, scheduler; char buf1[MAXPDSTRING], buf2[MAXPDSTRING]; int nmidiindev, midiindev[MAXMIDIINDEV]; *************** *** 402,406 ****
sys_get_audio_params(&naudioindev, audioindev, chindev, ! &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance);
if (naudioindev <= 0) --- 396,400 ----
sys_get_audio_params(&naudioindev, audioindev, chindev, ! &naudiooutdev, audiooutdev, choutdev, &rate, &dacblocksize, &advance, &scheduler);
if (naudioindev <= 0) *************** *** 430,433 **** --- 424,430 ---- sys_putpreference("dacblocksize", buf1);
+ sprintf(buf1, "%d", scheduler); + sys_putpreference("scheduler", buf1); + /* MIDI settings */ sys_get_midi_params(&nmidiindev, midiindev, &nmidioutdev, midioutdev);