Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29296/pd/src
Modified Files:
configure.in d_math.c d_soundfile.c g_array.c g_canvas.c
g_rtext.c g_scalar.c g_template.c m_binbuf.c m_sched.c
makefile.in makefile.nt notes.txt s_audio_alsa.c s_entry.c
s_inter.c s_main.c s_path.c u_main.tk x_list.c
Log Message:
various bug fixes.
Index: m_binbuf.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** m_binbuf.c 4 Oct 2006 19:35:06 -0000 1.13
--- m_binbuf.c 20 Jul 2007 03:25:20 -0000 1.14
***************
*** 389,393 ****
! #define MSTACKSIZE 2048
void binbuf_print(t_binbuf *x)
--- 389,393 ----
! #define MSTACKSIZE 10000 /* FIXME -- make this grow as needed */
void binbuf_print(t_binbuf *x)
Index: g_scalar.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_scalar.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** g_scalar.c 21 Aug 2005 17:46:52 -0000 1.8
--- g_scalar.c 20 Jul 2007 03:25:20 -0000 1.9
***************
*** 196,232 ****
}
! static void scalar_select(t_gobj *z, t_glist *owner, int state)
{
- t_scalar *x = (t_scalar *)z;
- t_symbol *templatesym = x->sc_template;
- t_template *tmpl;
- t_atom at;
- t_gpointer gp;
- gpointer_init(&gp);
- gpointer_setglist(&gp, owner, x);
- SETPOINTER(&at, &gp);
if (state)
{
int x1, y1, x2, y2;
! if (tmpl = template_findbyname(templatesym))
! template_notify(tmpl, gensym("select"), 1, &at);
! gpointer_unset(&gp);
!
! scalar_getrect(z, owner, &x1, &y1, &x2, &y2);
x1--; x2++; y1--; y2++;
sys_vgui(".x%lx.c create line %d %d %d %d %d %d %d %d %d %d \
-width 0 -fill blue -tags select%lx\n",
! glist_getcanvas(owner), x1, y1, x1, y2, x2, y2, x2, y1, x1, y1,
x);
}
else
{
! sys_vgui(".x%lx.c delete select%lx\n", glist_getcanvas(owner), x);
! if (tmpl = template_findbyname(templatesym))
! template_notify(tmpl, gensym("deselect"), 1, &at);
!
}
}
static void scalar_displace(t_gobj *z, t_glist *glist, int dx, int dy)
{
--- 196,235 ----
}
! static void scalar_drawselectrect(t_scalar *x, t_glist *glist, int state)
{
if (state)
{
int x1, y1, x2, y2;
!
! scalar_getrect(&x->sc_gobj, glist, &x1, &y1, &x2, &y2);
x1--; x2++; y1--; y2++;
sys_vgui(".x%lx.c create line %d %d %d %d %d %d %d %d %d %d \
-width 0 -fill blue -tags select%lx\n",
! glist_getcanvas(glist), x1, y1, x1, y2, x2, y2, x2, y1, x1, y1,
x);
}
else
{
! sys_vgui(".x%lx.c delete select%lx\n", glist_getcanvas(glist), x);
}
}
+ static void scalar_select(t_gobj *z, t_glist *owner, int state)
+ {
+ t_scalar *x = (t_scalar *)z;
+ t_template *tmpl;
+ t_symbol *templatesym = x->sc_template;
+ t_atom at;
+ t_gpointer gp;
+ gpointer_init(&gp);
+ gpointer_setglist(&gp, owner, x);
+ SETPOINTER(&at, &gp);
+ if (tmpl = template_findbyname(templatesym))
+ template_notify(tmpl, (state ? gensym("select") : gensym("deselect")),
+ 1, &at);
+ gpointer_unset(&gp);
+ scalar_drawselectrect(x, owner, state);
+ }
+
static void scalar_displace(t_gobj *z, t_glist *glist, int dx, int dy)
{
***************
*** 235,238 ****
--- 238,243 ----
t_template *template = template_findbyname(templatesym);
t_symbol *zz;
+ t_atom at[3];
+ t_gpointer gp;
int xonset, yonset, xtype, ytype, gotx, goty;
if (!template)
***************
*** 253,262 ****
*(t_float *)(((char *)(x->sc_vec)) + yonset) +=
dy * (glist_pixelstoy(glist, 1) - glist_pixelstoy(glist, 0));
scalar_redraw(x, glist);
- if (glist_isselected(glist, z))
- {
- scalar_select(z, glist, 0);
- scalar_select(z, glist, 1);
- }
}
--- 258,268 ----
*(t_float *)(((char *)(x->sc_vec)) + yonset) +=
dy * (glist_pixelstoy(glist, 1) - glist_pixelstoy(glist, 0));
+ gpointer_init(&gp);
+ gpointer_setglist(&gp, glist, x);
+ SETPOINTER(&at[0], &gp);
+ SETFLOAT(&at[1], (float)dx);
+ SETFLOAT(&at[2], (float)dy);
+ template_notify(template, gensym("displace"), 2, at);
scalar_redraw(x, glist);
}
***************
*** 300,303 ****
--- 306,314 ----
(*wb->w_parentvisfn)(y, owner, x->sc_vec, template, basex, basey, vis);
}
+ if (glist_isselected(owner, &x->sc_gobj))
+ {
+ scalar_drawselectrect(x, owner, 0);
+ scalar_drawselectrect(x, owner, 1);
+ }
sys_unqueuegui(x);
}
Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** s_main.c 20 Jan 2007 04:06:07 -0000 1.29
--- s_main.c 20 Jul 2007 03:25:20 -0000 1.30
***************
*** 82,85 ****
--- 82,86 ----
static int sys_choutlist[MAXAUDIOOUTDEV];
+ int sys_nosleep = 0; /* skip all "sleep" calls and spin instead */
t_sample* get_sys_soundout() { return sys_soundout; }
t_sample* get_sys_soundin() { return sys_soundin; }
***************
*** 398,401 ****
--- 399,403 ----
"-nrt -- don't use real-time priority\n",
#endif
+ "-nosleep -- spin, don't sleep (may lower latency on multi-CPUs)\n",
};
***************
*** 586,590 ****
else if (!strcmp(*argv, "-sleepgrain") && (argc > 1))
{
! sys_sleepgrain = 1000 * atoi(argv[1]);
argc -= 2; argv += 2;
}
--- 588,592 ----
else if (!strcmp(*argv, "-sleepgrain") && (argc > 1))
{
! sys_sleepgrain = 1000 * atof(argv[1]);
argc -= 2; argv += 2;
}
***************
*** 830,833 ****
--- 832,840 ----
}
#endif
+ else if (!strcmp(*argv, "-nosleep"))
+ {
+ sys_nosleep = 1;
+ argc--; argv++;
+ }
else if (!strcmp(*argv, "-soundindev") ||
!strcmp(*argv, "-audioindev"))
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** u_main.tk 9 Oct 2006 04:36:12 -0000 1.25
--- u_main.tk 20 Jul 2007 03:25:20 -0000 1.26
***************
*** 213,216 ****
--- 213,217 ----
set saveas_client doggy
set pd_opendir $untitled_directory
+ set pd_savedir $untitled_directory
set pd_undoaction no
set pd_redoaction no
***************
*** 3415,3420 ****
set localdir $pd_opendir
}
! set filename [tk_getOpenFile \
! -initialdir $localdir]
if {$filename != ""} {
set directory [string range $filename 0 \
--- 3416,3420 ----
set localdir $pd_opendir
}
! set filename [tk_getOpenFile -initialdir $localdir]
if {$filename != ""} {
set directory [string range $filename 0 \
***************
*** 3427,3435 ****
proc pdtk_savepanel {target localdir} {
if {$localdir == ""} {
! set filename [tk_getSaveFile]
! } else {
! set filename [tk_getSaveFile -initialdir $localdir]
}
if {$filename != ""} {
pd [concat $target callback [pdtk_enquote $filename] \;]
--- 3427,3435 ----
proc pdtk_savepanel {target localdir} {
+ global pd_savedir
if {$localdir == ""} {
! set localdir $pd_savedir
}
+ set filename [tk_getSaveFile -initialdir $localdir]
if {$filename != ""} {
pd [concat $target callback [pdtk_enquote $filename] \;]
Index: s_path.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_path.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** s_path.c 22 Oct 2006 21:46:11 -0000 1.12
--- s_path.c 20 Jul 2007 03:25:20 -0000 1.13
***************
*** 31,34 ****
--- 31,41 ----
#include <ctype.h>
+ #ifdef _LARGEFILE64_SOURCE
+ # define open open64
+ # define lseek lseek64
+ # define fstat fstat64
+ # define stat stat64
+ #endif
+
t_namelist *sys_externlist;
t_namelist *sys_searchpath;
Index: s_entry.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_entry.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** s_entry.c 11 Nov 2004 04:58:21 -0000 1.3
--- s_entry.c 20 Jul 2007 03:25:20 -0000 1.4
***************
*** 4,8 ****
int sys_main(int argc, char **argv);
! #ifdef MSW
#include <windows.h>
#include <stdio.h>
--- 4,12 ----
int sys_main(int argc, char **argv);
! /*
! * gcc does not support the __try stuff, only MSVC. Also, MinGW allows you to
! * use main() instead of WinMain(). <hans(a)at.or.at>
! */
! #if defined(_MSC_VER) && !defined(COMMANDVERSION)
#include <windows.h>
#include <stdio.h>
***************
*** 22,31 ****
}
! #else /* not MSW */
int main(int argc, char **argv)
{
return (sys_main(argc, argv));
}
! #endif
--- 26,35 ----
}
! #else /* not _MSC_VER ... */
int main(int argc, char **argv)
{
return (sys_main(argc, argv));
}
! #endif /* _MSC_VER */
Index: s_inter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** s_inter.c 15 Aug 2006 16:09:57 -0000 1.18
--- s_inter.c 20 Jul 2007 03:25:20 -0000 1.19
***************
*** 24,28 ****
#include <bstring.h>
#endif
! #ifdef MSW
#include <io.h>
#include <fcntl.h>
--- 24,28 ----
#include <bstring.h>
#endif
! #ifdef _WIN32
#include <io.h>
#include <fcntl.h>
***************
*** 30,37 ****
--- 30,40 ----
#include <winsock.h>
#include <windows.h>
+ # ifdef _MSC_VER
typedef int pid_t;
+ # endif
typedef int socklen_t;
#define EADDRINUSE WSAEADDRINUSE
#endif
+
#include <stdarg.h>
#include <signal.h>
***************
*** 151,154 ****
--- 154,159 ----
}
+ extern int sys_nosleep;
+
static int sys_domicrosleep(int microsec, int pollem)
{
***************
*** 157,161 ****
t_fdpoll *fp;
timout.tv_sec = 0;
! timout.tv_usec = microsec;
if (pollem)
{
--- 162,166 ----
t_fdpoll *fp;
timout.tv_sec = 0;
! timout.tv_usec = (sys_nosleep ? 0 : microsec);
if (pollem)
{
***************
*** 1154,1159 ****
0.33P2 : if there's no GUI, the watchdog pinging is done
from the scheduler idle routine in this process instead.) */
-
int pipe9[2], watchpid;
if (pipe(pipe9) < 0)
{
--- 1159,1164 ----
0.33P2 : if there's no GUI, the watchdog pinging is done
from the scheduler idle routine in this process instead.) */
int pipe9[2], watchpid;
+
if (pipe(pipe9) < 0)
{
Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** g_array.c 22 Oct 2006 21:46:10 -0000 1.12
--- g_array.c 20 Jul 2007 03:25:20 -0000 1.13
***************
*** 1052,1056 ****
binbuf_addv(b, "si", gensym("#A"), n2);
for (i = 0; i < chunk; i++)
! binbuf_addv(b, "f", ((float *)(array->a_vec))[n2+i]);
binbuf_addv(b, ";");
n2 += chunk;
--- 1052,1056 ----
binbuf_addv(b, "si", gensym("#A"), n2);
for (i = 0; i < chunk; i++)
! binbuf_addv(b, "f", ((t_word *)(array->a_vec))[n2+i].w_float);
binbuf_addv(b, ";");
n2 += chunk;
Index: makefile.nt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.nt,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** makefile.nt 11 Aug 2006 20:09:07 -0000 1.9
--- makefile.nt 20 Jul 2007 03:25:20 -0000 1.10
***************
*** 120,124 ****
s_entry_com.obj: s_entry.c
copy s_entry.c s_entry_com.c
! cl /c s_entry_com.c
del s_entry_com.c
--- 120,124 ----
s_entry_com.obj: s_entry.c
copy s_entry.c s_entry_com.c
! cl /c -DCOMMANDVERSION s_entry_com.c
del s_entry_com.c
Index: d_math.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_math.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** d_math.c 6 Sep 2004 20:20:33 -0000 1.2
--- d_math.c 20 Jul 2007 03:25:20 -0000 1.3
***************
*** 68,71 ****
--- 68,80 ----
#define DUMTAB2SIZE 1024
+ #ifdef MSW
+ #define int32 long
+ #endif
+
+ #if defined(__unix__) || defined(__APPLE__)
+ #include <sys/types.h>
+ #define int32 int32_t
+ #endif
+
static float rsqrt_exptab[DUMTAB1SIZE], rsqrt_mantissatab[DUMTAB2SIZE];
***************
*** 76,81 ****
{
float f;
! long l = (i ? (i == DUMTAB1SIZE-1 ? DUMTAB1SIZE-2 : i) : 1)<< 23;
! *(long *)(&f) = l;
rsqrt_exptab[i] = 1./sqrt(f);
}
--- 85,90 ----
{
float f;
! int32 l = (i ? (i == DUMTAB1SIZE-1 ? DUMTAB1SIZE-2 : i) : 1)<< 23;
! *(int32 *)(&f) = l;
rsqrt_exptab[i] = 1./sqrt(f);
}
Index: g_rtext.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_rtext.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** g_rtext.c 11 Aug 2006 20:09:07 -0000 1.6
--- g_rtext.c 20 Jul 2007 03:25:20 -0000 1.7
***************
*** 440,444 ****
x->x_bufsize = newsize;
! if (n == '\n' || isprint(n))
{
newsize = x->x_bufsize+1;
--- 440,447 ----
x->x_bufsize = newsize;
! /* at Guenter's suggestion, use 'n>31' to test wither a character might
! be printable in whatever 8-bit character set we find ourselves. */
!
! if (n == '\n' || n > 31)
{
newsize = x->x_bufsize+1;
Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** g_canvas.c 9 Oct 2006 04:36:12 -0000 1.18
--- g_canvas.c 20 Jul 2007 03:25:20 -0000 1.19
***************
*** 1049,1058 ****
have to do this for linux but not MSW; not sure about MacOS. */
! #ifdef MSW
! #define HORIZBORDER 0
! #define VERTBORDER 0
! #else
#define HORIZBORDER 2
#define VERTBORDER 2
#endif
--- 1049,1058 ----
have to do this for linux but not MSW; not sure about MacOS. */
! #ifdef __unix__
#define HORIZBORDER 2
#define VERTBORDER 2
+ #else
+ #define HORIZBORDER 4
+ #define VERTBORDER 4
#endif
Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** notes.txt 20 Jan 2007 04:06:07 -0000 1.35
--- notes.txt 20 Jul 2007 03:25:20 -0000 1.36
***************
*** 18,21 ****
--- 18,25 ----
problems:
+ fix declare to update current patch when changed
+ objects on GOP don't erase if you edit the GOP while they're showing
+ MSTACKSIZE limitation in m_binbuf.c
+ add -stack option to make 'regular' stack larger
TK menu on Windows says "wish"
activating windows in Gnome?
***************
*** 52,55 ****
--- 56,60 ----
features:
+ clickles connection (hit 'c' key or something)
messages to suppress menus&accelerators, and invisibilize Pd window
machine-independent fonts
***************
*** 97,107 ****
data:
hooks for table mousing, other changes (scalars?)
data to save as succession of "list" messages that textfile can store, etc.
implement list field (GOP or subwindow, perhaps GOP could suppress bounds rect?)
- fix blue selection rectangle to update if selected datum is redrawn
data copy/paste doesn't check templates aren't changed
arrays of non-existent templates crash
! vget, vset traversal objects
cursor to show (x, y) location
improve typing at drawnumbers
--- 102,113 ----
data:
+ make a 2-pass proecss for finding hot spot closes to any given click
+ replace list element with binbuf??
hooks for table mousing, other changes (scalars?)
data to save as succession of "list" messages that textfile can store, etc.
implement list field (GOP or subwindow, perhaps GOP could suppress bounds rect?)
data copy/paste doesn't check templates aren't changed
arrays of non-existent templates crash
! vget, vset traversal objects, pointer == and select equivalents
cursor to show (x, y) location
improve typing at drawnumbers
***************
*** 113,116 ****
--- 119,123 ----
more features:
+ clean out IRIX stuff
"-march=pentium4 -O2 -mfpmath=sse -msse -msse2 -mmmx" ?
try to improve for AMD - try "-march=athlon-xp -msse2"
Index: makefile.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** makefile.in 22 Oct 2006 21:46:11 -0000 1.15
--- makefile.in 20 Jul 2007 03:25:20 -0000 1.16
***************
*** 39,42 ****
--- 39,46 ----
SYSSRC += @SYSSRC@
+ ASIOSRC = @ASIOSRC@
+
+ ASIOOBJ = $(ASIOSRC:.cpp=.o)
+
SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \
***************
*** 92,95 ****
--- 96,102 ----
$(CC) $(CFLAGS) $(GFLAGS) $(GINCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
+ $(ASIOOBJ): %.o : %.cpp
+ $(CXX) $(CFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.cpp
+
pd: $(PDEXEC)
***************
*** 133,136 ****
--- 140,149 ----
../bin/libPdTcl.dylib
+ # this is for Windows/MinGW (only?)
+ $(BIN_DIR)/pdtcl.dll: $(GOBJ)
+ cd $(BIN_DIR); dllwrap --export-all-symbols --output-def pdtcl.def \
+ --output-lib=pdtcl.a --dllname=$(GUINAME) $(OBJ_DIR)/t_tkcmd.o $(LIB) $(GLIB)
+ strip --strip-unneeded $(BIN_DIR)/pdtcl.dll
+
externs:
cd ../extra/bonk~;make @EXTERNTARGET@
Index: s_audio_alsa.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_alsa.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** s_audio_alsa.c 8 Sep 2006 23:45:30 -0000 1.8
--- s_audio_alsa.c 20 Jul 2007 03:25:20 -0000 1.9
***************
*** 146,150 ****
check_error(err, "snd_pcm_hw_params_set_channels");
if (tmp_uint != (unsigned)*channels)
! post("ALSA: set input channels to %d", tmp_uint);
*channels = tmp_uint;
dev->a_channels = *channels;
--- 146,150 ----
check_error(err, "snd_pcm_hw_params_set_channels");
if (tmp_uint != (unsigned)*channels)
! post("ALSA: set %s channels to %d", (out?"output":"input"), tmp_uint);
*channels = tmp_uint;
dev->a_channels = *channels;
***************
*** 159,166 ****
#endif
! /* set the period - ie frag size */
! /* 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,
--- 159,164 ----
#endif
! /* post("frag size %d, nfrags %d", frag_size, nfrags); */
! /* set "period size" */
#ifdef ALSAAPI9
err = snd_pcm_hw_params_set_period_size_near(dev->a_handle,
***************
*** 172,186 ****
#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 */
--- 170,173 ----
***************
*** 430,434 ****
return SENDDACS_NO;
}
-
/* do output */
for (iodev = 0, fp1 = sys_soundout, ch = 0; iodev < alsa_noutdev; iodev++)
--- 417,420 ----
Index: configure.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/configure.in,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** configure.in 7 Dec 2006 16:19:05 -0000 1.22
--- configure.in 20 Jul 2007 03:25:20 -0000 1.23
***************
*** 21,24 ****
--- 21,25 ----
AC_SUBST(OSNUMBER)
AC_SUBST(EXTERNTARGET)
+ AC_SUBST(ASIOSRC)
dnl other defaults
***************
*** 81,85 ****
dnl Checking for `pthread_create' function in -pthread
AC_CHECK_LIB(pthread, pthread_create,PDLIB="$PDLIB -lpthread",
! echo "pthreads required" || exit 1)
dnl Check for fftw package
--- 82,89 ----
dnl Checking for `pthread_create' function in -pthread
AC_CHECK_LIB(pthread, pthread_create,PDLIB="$PDLIB -lpthread",
! AC_CHECK_LIB(pthreadGC2, pthread_create, PDLIB="$PDLIB -lpthreadGC2",
! AC_CHECK_LIB(pthreadGC1, pthread_create, PDLIB="$PDLIB -lpthreadGC1",
! AC_CHECK_LIB(pthreadGC, pthread_create, PDLIB="$PDLIB -lpthreadGC",
! echo "pthreads required"; exit 1))))
dnl Check for fftw package
***************
*** 119,122 ****
--- 123,131 ----
if test $foundit == "no";
then
+ AC_CHECK_HEADER(tcl8.4/tcl.h,
+ GUIFLAGS="$GUIFLAGS -I/usr/local/include/tcl8.4";foundit=yes,)
+ fi
+ if test $foundit == "no";
+ then
AC_CHECK_HEADER(tcl8.3/tcl.h,
GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.3";foundit=yes,)
***************
*** 130,154 ****
then
echo no tcl header found
! exit -1
fi
! AC_CHECK_LIB(tcl8.7, main,,
! AC_CHECK_LIB(tcl8.6, main,,
AC_CHECK_LIB(tcl8.5, main,,
AC_CHECK_LIB(tcl8.4, main,,
AC_CHECK_LIB(tcl8.3, main,,
AC_CHECK_LIB(tcl8.2, main,,
! AC_CHECK_LIB(tcl8.0, main,,echo no tcl library found || exit 1)))))))
! AC_CHECK_LIB(tk8.7, main,,
! AC_CHECK_LIB(tk8.6, main,,
AC_CHECK_LIB(tk8.5, main,,
AC_CHECK_LIB(tk8.4, main,,
AC_CHECK_LIB(tk8.3, main,,
AC_CHECK_LIB(tk8.2, main,,
! AC_CHECK_LIB(tk8.0, main,,echo no tk library found || exit 1)))))))
! if test `uname -s` = Linux;
then
dnl Ckecking for ALSA
--- 139,166 ----
then
echo no tcl header found
! echo bolding trying without...
! # exit -1
fi
! AC_CHECK_LIB(tcl85, main,,
AC_CHECK_LIB(tcl8.5, main,,
+ AC_CHECK_LIB(tcl84, main,,
AC_CHECK_LIB(tcl8.4, main,,
AC_CHECK_LIB(tcl8.3, main,,
AC_CHECK_LIB(tcl8.2, main,,
! AC_CHECK_LIB(tcl8.0, main,,
! echo no tcl library found; exit 1)))))))
! AC_CHECK_LIB(tk85, main,,
AC_CHECK_LIB(tk8.5, main,,
+ AC_CHECK_LIB(tk84, main,,
AC_CHECK_LIB(tk8.4, main,,
AC_CHECK_LIB(tk8.3, main,,
AC_CHECK_LIB(tk8.2, main,,
! AC_CHECK_LIB(tk8.0, main,,
! echo no tk library found; exit 1)))))))
! if test `uname -s` == Linux;
then
dnl Ckecking for ALSA
***************
*** 239,243 ****
fi
! if test `uname -s` = Darwin;
then
LDFLAGS="-Wl -framework CoreAudio \
--- 251,255 ----
fi
! if test `uname -s` == Darwin;
then
LDFLAGS="-Wl -framework CoreAudio \
***************
*** 317,320 ****
--- 329,365 ----
fi
+ # only Windows uses ASIO, for the rest, set to blank
+ ASIOSRC=
+
+ if test `uname -s` == MINGW32_NT-5.0;
+ then
+ EXT=dll
+ MORECFLAGS="-DUSEAPI_PORTAUDIO -DPA19 -DMSW -DPA_NO_DS -DPD_INTERNAL \
+ -I../portaudio/pa_common -I../portaudio/pablio \
+ -mwindows -mms-bitfields "$MORECFLAGS
+ PDLIB=$PDLIB" -lwsock32 -lwinmm -lole32 -lstdc++"
+
+ SYSSRC="s_audio_pa.c s_audio_pablio.c s_audio_paring.c \
+ s_audio_mmio.c s_midi_mmio.c \
+ ../portaudio/pa_common/pa_allocation.c \
+ ../portaudio/pa_common/pa_converters.c \
+ ../portaudio/pa_common/pa_cpuload.c \
+ ../portaudio/pa_common/pa_dither.c \
+ ../portaudio/pa_common/pa_front.c \
+ ../portaudio/pa_common/pa_process.c \
+ ../portaudio/pa_common/pa_skeleton.c \
+ ../portaudio/pa_common/pa_stream.c \
+ ../portaudio/pa_common/pa_trace.c \
+ ../portaudio/pa_win/pa_win_util.c \
+ ../portaudio/pa_win/pa_win_hostapis.c \
+ ../portaudio/pa_win_wmme/pa_win_wmme.c"
+ ASIOSRC="../portaudio/pa_asio/iasiothiscallresolver.cpp \
+ ../portaudio/pa_asio/pa_asio.cpp ../asio/asio.cpp \
+ ../asio/asiodrivers.cpp ../asio/asiolist.cpp"
+ STRIPFLAG="--strip-unneeded"
+ GUINAME="pdtcl.dll"
+ GUIFLAGS=
+ fi
+
# support for jack, on either linux or darwin:
Index: x_list.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_list.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** x_list.c 7 Dec 2006 16:19:05 -0000 1.5
--- x_list.c 20 Jul 2007 03:25:21 -0000 1.6
***************
*** 51,54 ****
--- 51,55 ----
t_pd l_pd; /* object to point inlets to */
int l_n; /* number of items */
+ int l_npointer; /* number of pointers */
t_listelem *l_vec; /* pointer to items */
} t_alist;
***************
*** 96,100 ****
{
x->l_pd = alist_class;
! x->l_n = 0;
x->l_vec = 0;
}
--- 97,101 ----
{
x->l_pd = alist_class;
! x->l_n = x->l_npointer = 0;
x->l_vec = 0;
}
***************
*** 123,131 ****
--- 124,137 ----
}
x->l_n = argc;
+ x->l_npointer = 0;
for (i = 0; i < argc; i++)
{
x->l_vec[i].l_a = argv[i];
if (x->l_vec[i].l_a.a_type == A_POINTER)
+ {
+ x->l_npointer++;
gpointer_copy(x->l_vec[i].l_a.a_w.w_gpointer, &x->l_vec[i].l_p);
+ x->l_vec[i].l_a.a_w.w_gpointer = &x->l_vec[i].l_p;
+ }
}
}
***************
*** 142,145 ****
--- 148,152 ----
}
x->l_n = argc+1;
+ x->l_npointer = 0;
SETSYMBOL(&x->l_vec[0].l_a, s);
for (i = 0; i < argc; i++)
***************
*** 147,151 ****
--- 154,162 ----
x->l_vec[i+1].l_a = argv[i];
if (x->l_vec[i+1].l_a.a_type == A_POINTER)
+ {
+ x->l_npointer++;
gpointer_copy(x->l_vec[i+1].l_a.a_w.w_gpointer, &x->l_vec[i+1].l_p);
+ x->l_vec[i].l_a.a_w.w_gpointer = &x->l_vec[i].l_p;
+ }
}
}
***************
*** 158,161 ****
--- 169,195 ----
}
+
+ static void alist_clone(t_alist *x, t_alist *y)
+ {
+ int i;
+ y->l_pd = alist_class;
+ y->l_n = x->l_n;
+ y->l_npointer = x->l_npointer;
+ if (!(y->l_vec = (t_listelem *)getbytes(y->l_n * sizeof(*y->l_vec))))
+ {
+ y->l_n = 0;
+ error("list_alloc: out of memory");
+ }
+ else for (i = 0; i < x->l_n; i++)
+ {
+ y->l_vec[i].l_a = x->l_vec[i].l_a;
+ if (y->l_vec[i].l_a.a_type == A_POINTER)
+ {
+ gpointer_copy(y->l_vec[i].l_a.a_w.w_gpointer, &y->l_vec[i].l_p);
+ y->l_vec[i].l_a.a_w.w_gpointer = &y->l_vec[i].l_p;
+ }
+ }
+ }
+
static void alist_setup(void)
{
***************
*** 193,198 ****
ATOMS_ALLOCA(outv, outc);
atoms_copy(argc, argv, outv);
! alist_toatoms(&x->x_alist, outv+argc);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
ATOMS_FREEA(outv, outc);
}
--- 227,243 ----
ATOMS_ALLOCA(outv, outc);
atoms_copy(argc, argv, outv);
! if (x->x_alist.l_npointer)
! {
! t_alist y;
! alist_clone(&x->x_alist, &y);
! alist_toatoms(&y, outv+argc);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! alist_clear(&y);
! }
! else
! {
! alist_toatoms(&x->x_alist, outv+argc);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! }
ATOMS_FREEA(outv, outc);
}
***************
*** 206,211 ****
SETSYMBOL(outv, s);
atoms_copy(argc, argv, outv + 1);
! alist_toatoms(&x->x_alist, outv + 1 + argc);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
ATOMS_FREEA(outv, outc);
}
--- 251,267 ----
SETSYMBOL(outv, s);
atoms_copy(argc, argv, outv + 1);
! if (x->x_alist.l_npointer)
! {
! t_alist y;
! alist_clone(&x->x_alist, &y);
! alist_toatoms(&y, outv + 1 + argc);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! alist_clear(&y);
! }
! else
! {
! alist_toatoms(&x->x_alist, outv + 1 + argc);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! }
ATOMS_FREEA(outv, outc);
}
***************
*** 252,261 ****
int n, outc = x->x_alist.l_n + argc;
ATOMS_ALLOCA(outv, outc);
- alist_toatoms(&x->x_alist, outv);
atoms_copy(argc, argv, outv + x->x_alist.l_n);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
ATOMS_FREEA(outv, outc);
}
static void list_prepend_anything(t_list_prepend *x, t_symbol *s,
int argc, t_atom *argv)
--- 308,330 ----
int n, outc = x->x_alist.l_n + argc;
ATOMS_ALLOCA(outv, outc);
atoms_copy(argc, argv, outv + x->x_alist.l_n);
! if (x->x_alist.l_npointer)
! {
! t_alist y;
! alist_clone(&x->x_alist, &y);
! alist_toatoms(&y, outv);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! alist_clear(&y);
! }
! else
! {
! alist_toatoms(&x->x_alist, outv);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! }
ATOMS_FREEA(outv, outc);
}
+
+
static void list_prepend_anything(t_list_prepend *x, t_symbol *s,
int argc, t_atom *argv)
***************
*** 264,271 ****
int n, outc = x->x_alist.l_n + argc + 1;
ATOMS_ALLOCA(outv, outc);
- alist_toatoms(&x->x_alist, outv);
SETSYMBOL(outv + x->x_alist.l_n, s);
atoms_copy(argc, argv, outv + x->x_alist.l_n + 1);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
ATOMS_FREEA(outv, outc);
}
--- 333,351 ----
int n, outc = x->x_alist.l_n + argc + 1;
ATOMS_ALLOCA(outv, outc);
SETSYMBOL(outv + x->x_alist.l_n, s);
atoms_copy(argc, argv, outv + x->x_alist.l_n + 1);
! if (x->x_alist.l_npointer)
! {
! t_alist y;
! alist_clone(&x->x_alist, &y);
! alist_toatoms(&y, outv);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! alist_clear(&y);
! }
! else
! {
! alist_toatoms(&x->x_alist, outv);
! outlet_list(x->x_obj.ob_outlet, &s_list, outc, outv);
! }
ATOMS_FREEA(outv, outc);
}
Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** d_soundfile.c 22 Oct 2006 21:46:10 -0000 1.13
--- d_soundfile.c 20 Jul 2007 03:25:20 -0000 1.14
***************
*** 31,34 ****
--- 31,38 ----
# define open open64
# define lseek lseek64
+ #define off_t __off64_t
+ #endif
+ #ifdef MSW
+ #define off_t long
#endif
***************
*** 370,374 ****
}
/* seek past header and any sample frames to skip */
! sysrtn = lseek(fd, nchannels * bytespersamp * skipframes + headersize, 0);
if (sysrtn != nchannels * bytespersamp * skipframes + headersize)
return (-1);
--- 374,379 ----
}
/* seek past header and any sample frames to skip */
! sysrtn = lseek(fd,
! ((off_t)nchannels) * bytespersamp * skipframes + headersize, 0);
if (sysrtn != nchannels * bytespersamp * skipframes + headersize)
return (-1);
***************
*** 959,963 ****
flags:
-skip <frames> ... frames to skip in file
- -nframes <frames>
-onset <frames> ... onset in table to read into (NOT DONE YET)
-raw <headersize channels bytes endian>
--- 964,967 ----
***************
*** 971,975 ****
int headersize = -1, channels = 0, bytespersamp = 0, bigendian = 0,
resize = 0, i, j;
! long skipframes = 0, nframes = 0, finalsize = 0, itemsleft,
maxsize = DEFMAXSIZE, itemsread = 0, bytelimit = 0x7fffffff;
int fd = -1;
--- 975,979 ----
int headersize = -1, channels = 0, bytespersamp = 0, bigendian = 0,
resize = 0, i, j;
! long skipframes = 0, finalsize = 0, itemsleft,
maxsize = DEFMAXSIZE, itemsread = 0, bytelimit = 0x7fffffff;
int fd = -1;
***************
*** 991,1001 ****
argc -= 2; argv += 2;
}
- else if (!strcmp(flag, "nframes"))
- {
- if (argc < 2 || argv[1].a_type != A_FLOAT ||
- ((nframes = argv[1].a_w.w_float) < 0))
- goto usage;
- argc -= 2; argv += 2;
- }
else if (!strcmp(flag, "raw"))
{
--- 995,998 ----
Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** g_template.c 9 Oct 2006 04:36:12 -0000 1.18
--- g_template.c 20 Jul 2007 03:25:20 -0000 1.19
***************
*** 1130,1134 ****
t_fielddesc *f = x->x_vec;
! if (!fielddesc_getfloat(&x->x_vis, template, data, 0))
return;
if (vis)
--- 1130,1135 ----
t_fielddesc *f = x->x_vec;
! /* see comment in plot_vis() */
! if (vis && !fielddesc_getfloat(&x->x_vis, template, data, 0))
return;
if (vis)
***************
*** 1270,1274 ****
}
}
! if (besterror > 10)
return (0);
if (doit)
--- 1271,1275 ----
}
}
! if (besterror > 6)
return (0);
if (doit)
***************
*** 1657,1665 ****
char *elem;
t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
!
if (plot_readownertemplate(x, data, template,
&elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
&vis, &scalarvis, &xfielddesc, &yfielddesc, &wfielddesc) ||
! ((vis == 0) && tovis) /* FIXME - why is 'tovis' flag necessary? */
|| array_getfields(elemtemplatesym, &elemtemplatecanvas,
&elemtemplate, &elemsize, xfielddesc, yfielddesc, wfielddesc,
--- 1658,1674 ----
char *elem;
t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
! /* even if the array is "invisible", if its visibility is
! set by an instance variable you have to explicitly erase it,
! because the flag could earlier have been on when we were getting
! drawn. Rather than look to try to find out whether we're
! visible we just do the erasure. At the TK level this should
! cause no action because the tag matches nobody. LATER we
! might want to optimize this somehow. Ditto the "vis()" routines
! for other drawing instructions. */
!
if (plot_readownertemplate(x, data, template,
&elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
&vis, &scalarvis, &xfielddesc, &yfielddesc, &wfielddesc) ||
! ((vis == 0) && tovis) /* see above for 'tovis' */
|| array_getfields(elemtemplatesym, &elemtemplatecanvas,
&elemtemplate, &elemsize, xfielddesc, yfielddesc, wfielddesc,
***************
*** 2109,2113 ****
t_drawnumber *x = (t_drawnumber *)z;
! if (!fielddesc_getfloat(&x->x_vis, template, data, 0))
return;
if (vis)
--- 2118,2123 ----
t_drawnumber *x = (t_drawnumber *)z;
! /* see comment in plot_vis() */
! if (vis && !fielddesc_getfloat(&x->x_vis, template, data, 0))
return;
if (vis)
Index: m_sched.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_sched.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** m_sched.c 18 May 2005 04:28:51 -0000 1.8
--- m_sched.c 20 Jul 2007 03:25:20 -0000 1.9
***************
*** 397,401 ****
sys_clearhist();
! if (sys_sleepgrain < 1000)
sys_sleepgrain = sys_schedadvance/4;
if (sys_sleepgrain < 100)
--- 397,401 ----
sys_clearhist();
! if (sys_sleepgrain < 100)
sys_sleepgrain = sys_schedadvance/4;
if (sys_sleepgrain < 100)