Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32607/src
Modified Files: Tag: devel_0_38 configure.in d_array.c g_editor.c g_graph.c g_hdial.c m_pd.h m_sched.c m_simd_sse_gcc.c makefile.in notes.txt s_audio_alsa.c s_audio_alsamm.c s_file.c s_inter.c s_main.c s_path.c u_main.tk x_connective.c Log Message: merging miller's changes between test7 and test10
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.4.4.2 retrieving revision 1.4.4.3 diff -C2 -d -r1.4.4.2 -r1.4.4.3 *** m_pd.h 10 Nov 2004 13:52:36 -0000 1.4.4.2 --- m_pd.h 11 Nov 2004 22:30:41 -0000 1.4.4.3 *************** *** 248,251 **** --- 248,252 ---- /* T.Grill - functions for aligned memory (according to CPU SIMD architecture) */ EXTERN void *getalignedbytes(size_t nbytes); + EXTERN void *copyalignedbytes(void *src, size_t nbytes); EXTERN void freealignedbytes(void *x,size_t nbytes); EXTERN void *resizealignedbytes(void *x,size_t oldsize, size_t newsize); *************** *** 468,471 **** --- 469,473 ---- EXTERN int sched_geteventno(void); EXTERN double sys_getrealtime(void); + EXTERN int (*sys_idlehook)(void); /* hook to add idle time computation */
*************** *** 522,525 **** --- 524,529 ---- EXTERN t_int *sig_tilde_perform(t_int *args);
+ EXTERN t_int *clip_perform(t_int *args); + /* for (n % 8) == 0 */ EXTERN t_int *zero_perf8(t_int *args); *************** *** 565,568 **** --- 569,575 ----
EXTERN t_int *sig_tilde_perf_simd(t_int *args); + + EXTERN t_int *clip_perf_simd(t_int *args); + /* } tb */
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.7.4.2 retrieving revision 1.7.4.3 diff -C2 -d -r1.7.4.2 -r1.7.4.3 *** s_main.c 10 Nov 2004 13:47:09 -0000 1.7.4.2 --- s_main.c 11 Nov 2004 22:30:42 -0000 1.7.4.3 *************** *** 8,12 **** */
! char pd_version[] = "Pd version 0.38 TEST7 devel\n"; char pd_compiletime[] = __TIME__; char pd_compiledate[] = __DATE__; --- 8,12 ---- */
! char pd_version[] = "Pd version 0.38 TEST10 devel\n"; char pd_compiletime[] = __TIME__; char pd_compiledate[] = __DATE__; *************** *** 75,79 **** int sys_midioutdevlist[MAXMIDIOUTDEV] = {1};
- char sys_font[] = "courier"; /* tb: font name */ static int sys_main_srate; static int sys_main_dacblocksize = DEFDACBLKSIZE; --- 75,78 ---- *************** *** 407,411 **** "-lib <file> -- load object library(s)\n", "-font <n> -- specify default font size in points\n", - "-typeface <name> -- specify default font (default: courier)\n", "-verbose -- extra printout on startup and when searching for files\n", "-version -- don't run Pd; just print out which version it is \n", --- 406,409 ---- *************** *** 776,787 **** argv += 2; } - /* tb: font name { */ - else if (!strcmp(*argv, "-typeface") && argc > 1) - { - strcpy(sys_font,*(argv+1)); - argc -= 2; - argv += 2; - } - /* } tb */ else if (!strcmp(*argv, "-verbose")) { --- 774,777 ---- *************** *** 819,822 **** --- 809,813 ---- { sys_printtostderr = 1; + fprintf(stderr, "set it\n"); argc--; argv++; }
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.4.4.3 retrieving revision 1.4.4.4 diff -C2 -d -r1.4.4.3 -r1.4.4.4 *** u_main.tk 10 Nov 2004 13:47:09 -0000 1.4.4.3 --- u_main.tk 11 Nov 2004 22:30:42 -0000 1.4.4.4 *************** *** 180,183 **** --- 180,184 ---- ################ utility functions #########################
+ # enquote a string to send it to a tcl function proc pdtk_enquote {x} { set foo [string map {"," "" ";" "" " ""} $x] *************** *** 186,189 **** --- 187,200 ---- }
+ #enquote a string to send it to Pd. Blow off semi and comma; alias spaces + proc pdtk_unspace {x} { + string map {" " "_" ";" "" "," ""} $x + } + + #enquote a string for preferences (command strings etc.) + proc pdtk_encodedialog {x} { + concat +[string map {" " "+_" "$" "+d" ";" "+s" "," "+c" "+" "++"} $x] + } + proc pdtk_debug {x} { tk_messageBox -message $x -type ok *************** *** 305,312 **** global pd_guidir global pd_myversion - global pd_font3 set name [format ".help%d" $doc_number] toplevel $name ! text $name.text -relief raised -bd 2 -font $pd_font3 \ -yscrollcommand "$name.scroll set" -background white scrollbar $name.scroll -command "$name.text yview" --- 316,322 ---- global pd_guidir global pd_myversion set name [format ".help%d" $doc_number] toplevel $name ! text $name.text -relief raised -bd 2 -font -*-courier-bold--normal--12-* \ -yscrollcommand "$name.scroll set" -background white scrollbar $name.scroll -command "$name.text yview" *************** *** 964,971 **** bind $name.c <Shift-Button> {pdtk_canvas_click %W %x %y %b 1} bind $name.c <Control-Shift-Button> {pdtk_canvas_click %W %x %y %b 3} bind $name.c <Alt-Button> {pdtk_canvas_click %W %x %y %b 4} bind $name.c <Alt-Shift-Button> {pdtk_canvas_click %W %x %y %b 5} bind $name.c <Alt-Control-Button> {pdtk_canvas_click %W %x %y %b 6} ! bind $name.c <Alt-Control-Shift-Button> {pdtk_canvas_click %W %x %y %b 7} global pd_nt # button 2 is the right button on Mac; on other platforms it's button 3. --- 974,991 ---- bind $name.c <Shift-Button> {pdtk_canvas_click %W %x %y %b 1} bind $name.c <Control-Shift-Button> {pdtk_canvas_click %W %x %y %b 3} + # Alt key is called Option on the Mac + if {$pd_nt == 2} { + bind $name.c <Option-Button> {pdtk_canvas_click %W %x %y %b 4} + bind $name.c <Option-Shift-Button> {pdtk_canvas_click %W %x %y %b 5} + bind $name.c <Option-Control-Button> {pdtk_canvas_click %W %x %y %b 6} + bind $name.c <Option-Control-Shift-Button> \ + {pdtk_canvas_click %W %x %y %b 7} + } else { bind $name.c <Alt-Button> {pdtk_canvas_click %W %x %y %b 4} bind $name.c <Alt-Shift-Button> {pdtk_canvas_click %W %x %y %b 5} bind $name.c <Alt-Control-Button> {pdtk_canvas_click %W %x %y %b 6} ! bind $name.c <Alt-Control-Shift-Button> \ ! {pdtk_canvas_click %W %x %y %b 7} ! } global pd_nt # button 2 is the right button on Mac; on other platforms it's button 3. *************** *** 988,992 **** --- 1008,1016 ---- bind $name.c <Control-Key> {pdtk_canvas_ctrlkey %W %K 0} bind $name.c <Control-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1} + if {$pd_nt == 2} { + bind $name.c <Option-Key> {pdtk_canvas_altkey %W %K %A} + } else { bind $name.c <Alt-Key> {pdtk_canvas_altkey %W %K %A} + } # bind $name.c <Mod1-Key> {puts stderr [concat mod1 %W %K %A]} if {$pd_nt == 2} { *************** *** 998,1002 **** --- 1022,1030 ---- bind $name.c <KeyRelease> {pdtk_canvas_keyup %W %K %A} bind $name.c <Motion> {pdtk_canvas_motion %W %x %y 0} + if {$pd_nt == 2} { + bind $name.c <Option-Motion> {pdtk_canvas_motion %W %x %y 4} + } else { bind $name.c <Alt-Motion> {pdtk_canvas_motion %W %x %y 4} + } bind $name.c <Map> {pdtk_canvas_map %W} bind $name.c <Unmap> {pdtk_canvas_unmap %W} *************** *** 1343,1347 **** } } ! concat $ret }
--- 1371,1375 ---- } } ! pdtk_unspace $ret }
*************** *** 1359,1363 **** } } ! concat $ret } --- 1387,1391 ---- } } ! pdtk_unspace $ret } *************** *** 1675,1681 **** pdtk_standardkeybindings $id.xrangef.x2 pdtk_standardkeybindings $id.xrangef.xpix ! pdtk_standardkeybindings $id.xrangef.y1 ! pdtk_standardkeybindings $id.xrangef.y2 ! pdtk_standardkeybindings $id.xrangef.ypix $id.xrangef.x2 select from 0 $id.xrangef.x2 select adjust end --- 1703,1709 ---- pdtk_standardkeybindings $id.xrangef.x2 pdtk_standardkeybindings $id.xrangef.xpix ! pdtk_standardkeybindings $id.yrangef.y1 ! pdtk_standardkeybindings $id.yrangef.y2 ! pdtk_standardkeybindings $id.yrangef.ypix $id.xrangef.x2 select from 0 $id.xrangef.x2 select adjust end *************** *** 2026,2032 **** set hhhgui_nam [string replace $hhhgui_nam 0 0 #] }
! set hhhsnd [string map {" " _} $hhhsnd] ! set hhhrcv [string map {" " _} $hhhrcv] ! set hhhgui_nam [string map {" " _} $hhhgui_nam]
pd [concat $id dialog \ --- 2054,2060 ---- set hhhgui_nam [string replace $hhhgui_nam 0 0 #] }
! set hhhsnd [pdtk_unspace $hhhsnd] ! set hhhrcv [pdtk_unspace $hhhrcv] ! set hhhgui_nam [pdtk_unspace $hhhgui_nam]
pd [concat $id dialog \ *************** *** 2659,2663 ****
proc pdtk_data_dialog {name stuff} { ! global pd_font3 toplevel $name wm title $name {Atom} --- 2687,2691 ----
proc pdtk_data_dialog {name stuff} { ! toplevel $name wm title $name {Atom} *************** *** 2674,2678 ****
text $name.text -relief raised -bd 2 -height 40 -width 60 \ ! -yscrollcommand "$name.scroll set" -font pd_font3 scrollbar $name.scroll -command "$name.text yview" pack $name.scroll -side right -fill y --- 2702,2706 ----
text $name.text -relief raised -bd 2 -height 40 -width 60 \ ! -yscrollcommand "$name.scroll set" -font -*-courier-bold--normal--12-* scrollbar $name.scroll -command "$name.text yview" pack $name.scroll -side right -fill y *************** *** 2699,2716 **** # if {$font < 13} {set fontname [format -*-courier-bold----%d-* $font]} # if {$font >= 13} {set fontname [format -*-courier-----%d-* $font]} - - global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7 - switch -- $font { - 8 { set typeface $pd_font1 } - 10 { set typeface $pd_font2 } - 12 { set typeface $pd_font3 } - 14 { set typeface $pd_font4 } - 16 { set typeface $pd_font5 } - 24 { set typeface $pd_font6 } - 36 { set typeface $pd_font7 } - } - $canvasname create text $x $y \ ! -font $typeface \ -tags $myname -text $text -fill $color -anchor nw # pd [concat $myname size [$canvasname bbox $myname] ;] --- 2727,2732 ---- # if {$font < 13} {set fontname [format -*-courier-bold----%d-* $font]} # if {$font >= 13} {set fontname [format -*-courier-----%d-* $font]} $canvasname create text $x $y \ ! -font [format -*-courier-bold--normal--%d-* $font] \ -tags $myname -text $text -fill $color -anchor nw # pd [concat $myname size [$canvasname bbox $myname] ;] *************** *** 2743,2776 **** # font sizes 8, 10, 12, 14, 16, and 24.
! # tb: user defined typefaces ! proc pdtk_pd_startup {version apilist fontname} { ! puts stderr [concat $version $apilist $fontname] global pd_myversion pd_apilist set pd_myversion $version set pd_apilist $apilist - global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
! set pd_font1 [format -*-%s-bold--normal--8-* $fontname] ! set pd_font2 [format -*-%s-bold--normal--10-* $fontname] ! set pd_font3 [format -*-%s-bold--normal--12-* $fontname] ! set pd_font4 [format -*-%s-bold--normal--14-* $fontname] ! set pd_font5 [format -*-%s-bold--normal--16-* $fontname] ! set pd_font6 [format -*-%s-bold--normal--24-* $fontname] ! set pd_font7 [format -*-%s-bold--normal--36-* $fontname]
! set width1 [font measure $pd_font1 x] ! set height1 [lindex [font metrics $pd_font1] 5] ! set width2 [font measure $pd_font2 x] ! set height2 [lindex [font metrics $pd_font2] 5] ! set width3 [font measure $pd_font3 x] ! set height3 [lindex [font metrics $pd_font3] 5] ! set width4 [font measure $pd_font4 x] ! set height4 [lindex [font metrics $pd_font4] 5] ! set width5 [font measure $pd_font5 x] ! set height5 [lindex [font metrics $pd_font5] 5] ! set width6 [font measure $pd_font6 x] ! set height6 [lindex [font metrics $pd_font6] 5] ! set width7 [font measure $pd_font7 x] ! set height7 [lindex [font metrics $pd_font7] 5]
set tclpatch [info patchlevel] --- 2759,2787 ---- # font sizes 8, 10, 12, 14, 16, and 24.
! proc pdtk_pd_startup {version apilist} { global pd_myversion pd_apilist set pd_myversion $version set pd_apilist $apilist
! set width1 [font measure -*-courier-bold--normal--8-* x] ! set height1 [lindex [font metrics -*-courier-bold--normal--8-*] 5]
! set width2 [font measure -*-courier-bold--normal--10-* x] ! set height2 [lindex [font metrics -*-courier-bold--normal--10-*] 5] ! ! set width3 [font measure -*-courier-bold--normal--12-* x] ! set height3 [lindex [font metrics -*-courier-bold--normal--12-*] 5] ! ! set width4 [font measure -*-courier-bold--normal--14-* x] ! set height4 [lindex [font metrics -*-courier-bold--normal--14-*] 5] ! ! set width5 [font measure -*-courier-bold--normal--16-* x] ! set height5 [lindex [font metrics -*-courier-bold--normal--16-*] 5] ! ! set width6 [font measure -*-courier-bold--normal--24-* x] ! set height6 [lindex [font metrics -*-courier-bold--normal--24-*] 5] ! ! set width7 [font measure -*-courier-bold--normal--36-* x] ! set height7 [lindex [font metrics -*-courier-bold--normal--36-*] 5]
set tclpatch [info patchlevel] *************** *** 2856,2860 ****
proc pdtk_pd_texteditor {stuff} { ! global edit_number pd_font3 set name [format ".text%d" $edit_number] set edit_number [expr $edit_number + 1] --- 2867,2871 ----
proc pdtk_pd_texteditor {stuff} { ! global edit_number set name [format ".text%d" $edit_number] set edit_number [expr $edit_number + 1] *************** *** 2873,2877 ****
text $name.text -relief raised -bd 2 -height 12 -width 60 \ ! -yscrollcommand "$name.scroll set" -font $pd_font3 scrollbar $name.scroll -command "$name.text yview" pack $name.scroll -side right -fill y --- 2884,2888 ----
text $name.text -relief raised -bd 2 -height 12 -width 60 \ ! -yscrollcommand "$name.scroll set" -font -*-courier-bold--normal--12-* scrollbar $name.scroll -command "$name.text yview" pack $name.scroll -side right -fill y *************** *** 3445,3453 ****
pd [concat pd path-dialog $pd_extrapath $pd_verbose \ ! [pdtk_enquote $pd_path0] [pdtk_enquote $pd_path1] \ ! [pdtk_enquote $pd_path2] [pdtk_enquote $pd_path3] \ ! [pdtk_enquote $pd_path4] [pdtk_enquote $pd_path5] \ ! [pdtk_enquote $pd_path6] [pdtk_enquote $pd_path7] \ ! [pdtk_enquote $pd_path8] [pdtk_enquote $pd_path9] ;] }
--- 3456,3464 ----
pd [concat pd path-dialog $pd_extrapath $pd_verbose \ ! [pdtk_encodedialog $pd_path0] [pdtk_encodedialog $pd_path1] \ ! [pdtk_encodedialog $pd_path2] [pdtk_encodedialog $pd_path3] \ ! [pdtk_encodedialog $pd_path4] [pdtk_encodedialog $pd_path5] \ ! [pdtk_encodedialog $pd_path6] [pdtk_encodedialog $pd_path7] \ ! [pdtk_encodedialog $pd_path8] [pdtk_encodedialog $pd_path9] ;] }
*************** *** 3517,3526 **** global pd_startup5 pd_startup6 pd_startup7 pd_startup8 pd_startup9
! pd [concat pd startup-dialog $pd_nort [pdtk_enquote $pd_flags] \ ! [pdtk_enquote $pd_startup0] [pdtk_enquote $pd_startup1] \ ! [pdtk_enquote $pd_startup2] [pdtk_enquote $pd_startup3] \ ! [pdtk_enquote $pd_startup4] [pdtk_enquote $pd_startup5] \ ! [pdtk_enquote $pd_startup6] [pdtk_enquote $pd_startup7] \ ! [pdtk_enquote $pd_startup8] [pdtk_enquote $pd_startup9] ;]
} --- 3528,3537 ---- global pd_startup5 pd_startup6 pd_startup7 pd_startup8 pd_startup9
! pd [concat pd startup-dialog $pd_nort [pdtk_encodedialog $pd_flags] \ ! [pdtk_encodedialog $pd_startup0] [pdtk_encodedialog $pd_startup1] \ ! [pdtk_encodedialog $pd_startup2] [pdtk_encodedialog $pd_startup3] \ ! [pdtk_encodedialog $pd_startup4] [pdtk_encodedialog $pd_startup5] \ ! [pdtk_encodedialog $pd_startup6] [pdtk_encodedialog $pd_startup7] \ ! [pdtk_encodedialog $pd_startup8] [pdtk_encodedialog $pd_startup9] ;]
}
Index: s_path.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_path.c,v retrieving revision 1.3.4.2 retrieving revision 1.3.4.3 diff -C2 -d -r1.3.4.2 -r1.3.4.3 *** s_path.c 7 Nov 2004 11:14:15 -0000 1.3.4.2 --- s_path.c 11 Nov 2004 22:30:42 -0000 1.3.4.3 *************** *** 490,493 **** --- 490,527 ---- }
+ /* undo pdtl_encodedialog. This allows dialogs to send spaces, commas, + dollars, and semis down here. */ + t_symbol *sys_decodedialog(t_symbol *s) + { + char buf[MAXPDSTRING], *sp = s->s_name; + int i; + if (*sp != '+') + bug("sys_decodedialog: %s", sp); + else sp++; + for (i = 0; i < MAXPDSTRING-1; i++) + { + if (!sp[0]) + break; + if (sp[0] == '+') + { + if (sp[1] == '_') + buf[i] = ' ', sp++; + else if (sp[1] == '+') + buf[i] = '+', sp++; + else if (sp[1] == 'c') + buf[i] = ',', sp++; + else if (sp[1] == 's') + buf[i] = ';', sp++; + else if (sp[1] == 'd') + buf[i] = '$', sp++; + else buf[i] = sp[0]; + sp++; + } + } + buf[i] = 0; + return (gensym(buf)); + } + + /* start a search path dialog window */ void glob_start_path_dialog(t_pd *dummy) *************** *** 514,520 **** sys_usestdpath = atom_getintarg(0, argc, argv); sys_verbose = atom_getintarg(1, argc, argv); ! for (i = 0; i < argc; i++) { ! t_symbol *s = atom_getsymbolarg(i+2, argc, argv); if (*s->s_name) sys_searchpath = namelist_append_files(sys_searchpath, s->s_name); --- 548,554 ---- sys_usestdpath = atom_getintarg(0, argc, argv); sys_verbose = atom_getintarg(1, argc, argv); ! for (i = 0; i < argc-2; i++) { ! t_symbol *s = sys_decodedialog(atom_getsymbolarg(i+2, argc, argv)); if (*s->s_name) sys_searchpath = namelist_append_files(sys_searchpath, s->s_name); *************** *** 546,553 **** sys_externlist = 0; sys_defeatrt = atom_getintarg(0, argc, argv); ! sys_flags = atom_getsymbolarg(1, argc, argv); ! for (i = 0; i < argc; i++) { ! t_symbol *s = atom_getsymbolarg(i+2, argc, argv); if (*s->s_name) sys_externlist = namelist_append_files(sys_externlist, s->s_name); --- 580,587 ---- sys_externlist = 0; sys_defeatrt = atom_getintarg(0, argc, argv); ! sys_flags = sys_decodedialog(atom_getsymbolarg(1, argc, argv)); ! for (i = 0; i < argc-2; i++) { ! t_symbol *s = sys_decodedialog(atom_getsymbolarg(i+2, argc, argv)); if (*s->s_name) sys_externlist = namelist_append_files(sys_externlist, s->s_name);
Index: configure.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/configure.in,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** configure.in 8 Nov 2004 17:57:50 -0000 1.5.4.2 --- configure.in 11 Nov 2004 22:30:41 -0000 1.5.4.3 *************** *** 133,140 **** then dnl Ckecking for ALSA ! dnl This should be fixed so Pd can use ALSA shared libraries where appropriate. if test x$alsa == xyes; then - echo yes ... alsa is... $alsa AC_CHECK_LIB(asound,snd_pcm_info,PDLIB="$PDLIB -lasound" ; alsa="yes",alsa="no") fi --- 133,139 ---- then dnl Ckecking for ALSA ! echo .................... alsa= $alsa dnl This should be fixed so Pd can use ALSA shared libraries where appropriate. if test x$alsa == xyes; then AC_CHECK_LIB(asound,snd_pcm_info,PDLIB="$PDLIB -lasound" ; alsa="yes",alsa="no") fi
Index: makefile.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/makefile.in,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** makefile.in 6 Sep 2004 20:20:35 -0000 1.4 --- makefile.in 11 Nov 2004 22:30:42 -0000 1.4.4.1 *************** *** 44,48 **** x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \ x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c d_soundfile.c \ ! $(SYSSRC)
--- 44,48 ---- x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \ x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c d_soundfile.c \ ! $(SYSSRC) m_simd.c m_simd_sse_gcc.c m_simd_sse_vc.c m_simd_ve_gcc.c
*************** *** 95,100 ****
$(BIN_DIR)/pd.tk: u_main.tk ! echo set pd_nt @OSNUMBER@ > $(BIN_DIR)/pd.tk ! grep -v "set pd_nt" < u_main.tk >> $(BIN_DIR)/pd.tk
#this is for Max OSX only... --- 95,99 ----
$(BIN_DIR)/pd.tk: u_main.tk ! install u_main.tk $(BIN_DIR)/pd.tk
#this is for Max OSX only...
Index: m_simd_sse_gcc.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/m_simd_sse_gcc.c,v retrieving revision 1.1.4.3 retrieving revision 1.1.4.4 diff -C2 -d -r1.1.4.3 -r1.1.4.4 *** m_simd_sse_gcc.c 10 Nov 2004 21:53:02 -0000 1.1.4.3 --- m_simd_sse_gcc.c 11 Nov 2004 22:30:41 -0000 1.1.4.4 *************** *** 712,716 **** "minps %3, %%xmm4 \n" "movaps %%xmm4, 8*T_FLOAT(%1) \n" ! "movaps 12*T_FLOAT(%0), %%xmm5 \n" "maxps %2, %%xmm5 \n" --- 712,716 ---- "minps %3, %%xmm4 \n" "movaps %%xmm4, 8*T_FLOAT(%1) \n" ! "movaps 12*T_FLOAT(%0), %%xmm5 \n" "maxps %2, %%xmm5 \n"
Index: g_hdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** g_hdial.c 6 Sep 2004 20:20:33 -0000 1.4 --- g_hdial.c 11 Nov 2004 22:30:41 -0000 1.4.4.1 *************** *** 240,245 **** iemgui_save(&x->x_gui, srl, bflcol); binbuf_addv(b, "ssiisiiiisssiiiiiiii", gensym("#X"),gensym("obj"), ! (int)text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist), ! (int)text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist), (pd_class(&x->x_gui.x_obj.ob_pd) == hradio_old_class ? gensym("hdl") : gensym("hradio")), --- 240,244 ---- iemgui_save(&x->x_gui, srl, bflcol); binbuf_addv(b, "ssiisiiiisssiiiiiiii", gensym("#X"),gensym("obj"), ! (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, (pd_class(&x->x_gui.x_obj.ob_pd) == hradio_old_class ? gensym("hdl") : gensym("hradio")),
Index: g_graph.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** g_graph.c 5 Nov 2004 14:27:45 -0000 1.3.4.1 --- g_graph.c 11 Nov 2004 22:30:41 -0000 1.3.4.2 *************** *** 114,120 **** { t_gobj *y, *y2; ! int dspstate = canvas_suspend_dsp(); while (y = x->gl_list) glist_delete(x, y); canvas_resume_dsp(dspstate); } --- 114,132 ---- { t_gobj *y, *y2; ! int dspstate = 0, suspended = 0; ! t_symbol *dspsym = gensym("dsp"); while (y = x->gl_list) + { + /* to avoid unnecessary DSP resorting, we suspend DSP + only if we hit a patchable object. */ + if (!suspended && pd_checkobject(&y->g_pd) && zgetfn(&y->g_pd, dspsym)) + { + dspstate = canvas_suspend_dsp(); + suspended = 1; + } + /* here's the real deletion. */ glist_delete(x, y); + } + if (suspended) canvas_resume_dsp(dspstate); } *************** *** 620,624 **** t.tr_lx1, t.tr_ly1, t.tr_lx2, t.tr_ly2); } ! if (x->gl_owner) { graph_vis(&x->gl_gobj, x->gl_owner, 0); --- 632,636 ---- t.tr_lx1, t.tr_ly1, t.tr_lx2, t.tr_ly2); } ! if (x->gl_owner && glist_isvisible(x->gl_owner)) { graph_vis(&x->gl_gobj, x->gl_owner, 0);
Index: notes.txt =================================================================== RCS file: /cvsroot/pure-data/pd/src/notes.txt,v retrieving revision 1.6.4.1 retrieving revision 1.6.4.2 diff -C2 -d -r1.6.4.1 -r1.6.4.2 *** notes.txt 5 Nov 2004 14:27:46 -0000 1.6.4.1 --- notes.txt 11 Nov 2004 22:30:42 -0000 1.6.4.2 *************** *** 30,33 **** --- 30,37 ---- uploaded to CVS bug fix: click on minaturized subpatch fails to "vis" it + bug fix: CK on Oct. 4 (crash changing font size) + sched_idle hook + fixed startup flags, path, etc. so that spaces, "," chars, etc., are allowed + configure script fixed to handle enable- and disable- correctly
doc: *************** *** 37,42 ****
problems: - startup flags need to handle spaces, duh. - test MIDI I/O on all platforms, inc. sysex... '[' in numbox label breaks it (Yury Sept. 3) soundfiles with 3-byte samples buzz for the first readsf buffer (bug/x.pd) --- 41,44 ---- *************** *** 59,69 **** data copy/paste doesn't check templates aren't changed figure out why Pd sometimes crashes when you close example after adding fields
next release: pixel font sizes pd to find running ones (pd -new to defeat) "enter" into object box to create new one (also, changing borders? forking?) tab to jump to a connected object (first one?) (shift-tab to back up?) - portaudio v19? tables: if there's just one array, don't do stringent hit check. --- 61,73 ---- data copy/paste doesn't check templates aren't changed figure out why Pd sometimes crashes when you close example after adding fields + check if _vsnprintf with zero argument in windows works any better...
next release: + update portmusic to latest + IEM guis to use queued updates pixel font sizes pd to find running ones (pd -new to defeat) "enter" into object box to create new one (also, changing borders? forking?) tab to jump to a connected object (first one?) (shift-tab to back up?) tables: if there's just one array, don't do stringent hit check.
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.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_inter.c 8 Nov 2004 17:54:42 -0000 1.5.4.2 --- s_inter.c 11 Nov 2004 22:30:42 -0000 1.5.4.3 *************** *** 88,92 **** extern char pd_version[]; extern int sys_guisetportnumber; - extern char sys_font[]; /* tb: typeface */
static int sys_nfdpoll; --- 88,91 ---- *************** *** 1214,1219 **** #endif sys_get_audio_apis(buf); ! sys_vgui("pdtk_pd_startup {%s} %s {%s}\n", pd_version, buf, ! sys_font); } return (0); --- 1213,1217 ---- #endif sys_get_audio_apis(buf); ! sys_vgui("pdtk_pd_startup {%s} %s\n", pd_version, buf); } return (0);
Index: m_sched.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_sched.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 *** m_sched.c 10 Nov 2004 13:47:08 -0000 1.5.4.2 --- m_sched.c 11 Nov 2004 22:30:41 -0000 1.5.4.3 *************** *** 382,385 **** --- 382,390 ---- void sys_initmidiqueue( void);
+ /* sys_idlehook is a hook the user can fill in to grab idle time. Return + nonzero if you actually used the time; otherwise we're really really idle and + will now sleep. */ + int (*sys_idlehook)(void); + int m_scheduler( void) { *************** *** 475,488 ****
#ifdef THREAD_LOCKING ! /* T.Grill - enter idle phase -> unlock thread lock */ ! sys_unlock(); #endif ! if (timeforward != SENDDACS_SLEPT) ! sys_microsleep(sys_sleepgrain); #ifdef THREAD_LOCKING ! /* T.Grill - leave idle phase -> lock thread lock */ ! sys_lock(); #endif - sys_addhist(5); sched_didnothing++; --- 480,499 ----
#ifdef THREAD_LOCKING ! /* T.Grill - enter idle phase -> unlock thread lock */ ! sys_unlock(); #endif ! /* call externally installed idle function if any. */ ! if (!sys_idlehook || !sys_idlehook()) ! { ! /* if even that had nothing to do, sleep. */ ! if (timeforward != SENDDACS_SLEPT) ! { ! sys_microsleep(sys_sleepgrain); ! } ! } #ifdef THREAD_LOCKING ! /* T.Grill - leave idle phase -> lock thread lock */ ! sys_lock(); #endif sys_addhist(5); sched_didnothing++;
Index: s_audio_alsa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsa.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_alsa.c 10 Nov 2004 13:47:09 -0000 1.5.4.2 --- s_audio_alsa.c 11 Nov 2004 22:30:42 -0000 1.5.4.3 *************** *** 31,34 **** --- 31,39 ---- #define DEBUG2(x) {x;}
+ /* needed for alsa 0.9 compatibility: */ + #if (SND_LIB_MAJOR < 1) + #define ALSAAPI9 + #endif + static void alsa_checkiosync( void); static void alsa_numbertoname(int iodev, char *devname, int nchar); *************** *** 146,164 **** --- 151,185 ---- /* LATER try this to get a recommended period size... right now, it trips an assertion failure in ALSA lib */ + + #ifdef ALSAAPI9 + err = snd_pcm_hw_params_set_period_size_near(dev->a_handle, + hw_params, (snd_pcm_uframes_t)frag_size, 0); + #else tmp_snd_pcm_uframes = frag_size; err = snd_pcm_hw_params_set_period_size_near(dev->a_handle, hw_params, &tmp_snd_pcm_uframes, 0); + #endif check_error(err, "snd_pcm_hw_params_set_period_size_near (input)");
/* set the number of periods - ie numfrags */ + #ifdef ALSAAPI9 + err = snd_pcm_hw_params_set_periods_near(dev->a_handle, + hw_params, nfrags, 0); + #else tmp_uint = nfrags; err = snd_pcm_hw_params_set_periods_near(dev->a_handle, hw_params, &tmp_uint, 0); + #endif check_error(err, "snd_pcm_hw_params_set_periods_near (input)");
/* set the buffer size */ + #ifdef ALSAAPI9 + err = snd_pcm_hw_params_set_buffer_size_near(dev->a_handle, + hw_params, nfrags * frag_size); + #else tmp_snd_pcm_uframes = nfrags * frag_size; err = snd_pcm_hw_params_set_buffer_size_near(dev->a_handle, hw_params, &tmp_snd_pcm_uframes); + #endif check_error(err, "snd_pcm_hw_params_set_buffer_size_near (input)");
Index: s_audio_alsamm.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsamm.c,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.3 diff -C2 -d -r1.1.4.2 -r1.1.4.3 *** s_audio_alsamm.c 10 Nov 2004 13:47:09 -0000 1.1.4.2 --- s_audio_alsamm.c 11 Nov 2004 22:30:42 -0000 1.1.4.3 *************** *** 32,35 **** --- 32,39 ---- #include "s_audio_alsa.h"
+ /* needed for alsa 0.9 compatibility: */ + #if (SND_LIB_MAJOR < 1) + #define ALSAAPI9 + #endif /* sample type magic ... Hammerfall/HDSP/DSPMADI cards always 32Bit where lower 8Bit not used (played) in AD/DA, *************** *** 421,424 **** --- 425,429 ---- static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params,int *chs) { + #ifndef ALSAAPI9 unsigned int rrate; int err, dir; *************** *** 651,654 **** --- 656,660 ---- return err; } + #endif /* ALSAAPI9 */ return 0; } *************** *** 656,659 **** --- 662,666 ---- static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams, int playback) { + #ifndef ALSAAPI9 int err; snd_pcm_uframes_t ps,ops; *************** *** 766,770 **** --- 773,780 ---- if(sys_verbose) post("set sw finished"); + #else + post("alsa: need version 1.0 or above for mmap operation"); #endif + #endif /* ALSAAPI9 */ return 0; }
Index: g_editor.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -C2 -d -r1.4.4.1 -r1.4.4.2 *** g_editor.c 5 Nov 2004 14:27:45 -0000 1.4.4.1 --- g_editor.c 11 Nov 2004 22:30:41 -0000 1.4.4.2 *************** *** 1377,1382 **** x, 1); } ! else if (x->gl_editor->e_onmotion == MA_PASSOUT) ! x->gl_editor->e_onmotion = 0; x->gl_editor->e_onmotion = MA_NONE; } --- 1377,1383 ---- x, 1); } ! if (x->gl_editor->e_onmotion != MA_NONE) ! sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x); ! x->gl_editor->e_onmotion = MA_NONE; } *************** *** 1851,1855 **** memcpy(canvas_textcopybuf, buf, bufsize); canvas_textcopybufsize = bufsize; - post("buf size %d", bufsize); #else /* UNIX */ /* otherwise just copy the text to the clipboard here */ --- 1852,1855 ---- *************** *** 1884,1888 **** int dspstate;
- post("doclear"); dspstate = canvas_suspend_dsp(); if (x->gl_editor->e_selectedline) --- 1884,1887 ---- *************** *** 2100,2104 **** (src? class_getname(pd_class(&src->g_pd)) : "???"), (sink? class_getname(pd_class(&sink->g_pd)) : "???")); - abort(); }
--- 2099,2102 ----
Index: x_connective.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_connective.c,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** x_connective.c 6 Sep 2004 20:20:36 -0000 1.3 --- x_connective.c 11 Nov 2004 22:30:43 -0000 1.3.4.1 *************** *** 1065,1074 **** } t_spigot;
! static void *spigot_new(void) { t_spigot *x = (t_spigot *)pd_new(spigot_class); floatinlet_new(&x->x_obj, &x->x_state); outlet_new(&x->x_obj, 0); ! x->x_state = 0; return (x); } --- 1065,1074 ---- } t_spigot;
! static void *spigot_new(t_floatarg f) { t_spigot *x = (t_spigot *)pd_new(spigot_class); floatinlet_new(&x->x_obj, &x->x_state); outlet_new(&x->x_obj, 0); ! x->x_state = f; return (x); } *************** *** 1107,1111 **** { spigot_class = class_new(gensym("spigot"), (t_newmethod)spigot_new, 0, ! sizeof(t_spigot), 0, A_DEFSYM, 0); class_addbang(spigot_class, spigot_bang); class_addpointer(spigot_class, spigot_pointer); --- 1107,1111 ---- { spigot_class = class_new(gensym("spigot"), (t_newmethod)spigot_new, 0, ! sizeof(t_spigot), 0, A_DEFFLOAT, 0); class_addbang(spigot_class, spigot_bang); class_addpointer(spigot_class, spigot_pointer);
Index: d_array.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_array.c,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** d_array.c 5 Nov 2004 13:39:55 -0000 1.3.4.1 --- d_array.c 11 Nov 2004 22:30:41 -0000 1.3.4.2 *************** *** 799,802 **** --- 799,803 ---- t_object x_obj; float *x_vec; + int x_vecsize; t_symbol *x_arrayname; } t_tabreceive; *************** *** 808,812 **** int n = w[3]; t_float *from = x->x_vec; ! if (from) while (n--) *out++ = *from++; else while (n--) *out++ = 0; return (w+4); --- 809,821 ---- int n = w[3]; t_float *from = x->x_vec; ! if (from) ! { ! int vecsize = x->x_vecsize; ! while (vecsize--) ! *out++ = *from++; ! vecsize = n - x->x_vecsize; ! while (vecsize--) ! *out++ = 0; ! } else while (n--) *out++ = 0; return (w+4); *************** *** 838,843 **** { t_garray *a; - int vecsize; - if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { --- 847,850 ---- *************** *** 845,862 **** pd_error(x, "tabsend~: %s: no such array", x->x_arrayname->s_name); } ! else if (!garray_getfloatarray(a, &vecsize, &x->x_vec)) pd_error(x, "%s: bad template for tabreceive~", x->x_arrayname->s_name); else { ! int n = sp[0]->s_n; ! if (n < vecsize) vecsize = n; garray_usedindsp(a); ! if(vecsize&7) ! dsp_add(tabreceive_perform, 3, x, sp[0]->s_vec, vecsize); ! else if(SIMD_CHECK1(vecsize,sp[0]->s_vec)) /* the array is aligned in any case */ ! dsp_add(tabreceive_perfsimd, 3, x, sp[0]->s_vec, vecsize); else ! dsp_add(tabreceive_perf8, 3, x, sp[0]->s_vec, vecsize); } } --- 852,869 ---- pd_error(x, "tabsend~: %s: no such array", x->x_arrayname->s_name); } ! else if (!garray_getfloatarray(a, &x->x_vecsize, &x->x_vec)) pd_error(x, "%s: bad template for tabreceive~", x->x_arrayname->s_name); else { ! if (x->x_vecsize > sp[0]->s_n) ! x->x_vecsize = sp[0]->s_n; garray_usedindsp(a); ! if(sp[0]->s_n&7) ! dsp_add(tabreceive_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); ! else if(SIMD_CHECK1(sp[0]->s_n,sp[0]->s_vec)) /* the array is aligned in any case */ ! dsp_add(tabreceive_perfsimd, 3, x, sp[0]->s_vec, sp[0]->s_n); else ! dsp_add(tabreceive_perf8, 3, x, sp[0]->s_vec, sp[0]->s_n); } } *************** *** 930,934 **** }
! /* ---------- tabread4: control, non-interpolating ------------------------ */
static t_class *tabread4_class; --- 937,941 ---- }
! /* ---------- tabread4: control, 4-point interpolation --------------- */
static t_class *tabread4_class;
Index: s_file.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_file.c,v retrieving revision 1.2.4.3 retrieving revision 1.2.4.4 diff -C2 -d -r1.2.4.3 -r1.2.4.4 *** s_file.c 10 Nov 2004 13:47:09 -0000 1.2.4.3 --- s_file.c 11 Nov 2004 22:30:42 -0000 1.2.4.4 *************** *** 224,228 **** char cmdbuf[256]; int nread = 0, nleft = size; ! snprintf(cmdbuf, 256, "defaults read com.ucsd.pd %s 2> /dev/null\n", key); FILE *fp = popen(cmdbuf, "r"); while (nread < size) --- 224,228 ---- char cmdbuf[256]; int nread = 0, nleft = size; ! snprintf(cmdbuf, 256, "defaults read org.puredata.pd %s 2> /dev/null\n", key); FILE *fp = popen(cmdbuf, "r"); while (nread < size) *************** *** 234,242 **** } pclose(fp); ! if (!nread) return (0); if (nread >= size) nread = size-1; value[nread] = 0; return(1); } --- 234,244 ---- } pclose(fp); ! if (nread < 1) return (0); if (nread >= size) nread = size-1; value[nread] = 0; + if (value[nread-1] == '\n') /* remove newline character at end */ + value[nread-1] = 0; return(1); } *************** *** 254,258 **** char cmdbuf[MAXPDSTRING]; snprintf(cmdbuf, MAXPDSTRING, ! "defaults write com.ucsd.pd %s "%s" 2> /dev/null\n", key, value); system(cmdbuf); } --- 256,260 ---- char cmdbuf[MAXPDSTRING]; snprintf(cmdbuf, MAXPDSTRING, ! "defaults write org.puredata.pd %s "%s" 2> /dev/null\n", key, value); system(cmdbuf); }