aboutsummaryrefslogtreecommitdiff
path: root/pd/src
diff options
context:
space:
mode:
Diffstat (limited to 'pd/src')
-rw-r--r--pd/src/g_canvas.c2
-rw-r--r--pd/src/g_io.c9
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/notes.txt32
-rw-r--r--pd/src/s_audio.c26
-rw-r--r--pd/src/s_main.c8
-rw-r--r--pd/src/s_midi.c4
7 files changed, 37 insertions, 46 deletions
diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c
index dd9dd478..9385c05f 100644
--- a/pd/src/g_canvas.c
+++ b/pd/src/g_canvas.c
@@ -377,6 +377,8 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
static int dollarzero = 1000;
t_canvasenvironment *env = x->gl_env =
(t_canvasenvironment *)getbytes(sizeof(*x->gl_env));
+ if (!canvas_newargv)
+ canvas_newargv = getbytes(0);
env->ce_dir = canvas_newdirectory;
env->ce_argc = canvas_newargc;
env->ce_argv = canvas_newargv;
diff --git a/pd/src/g_io.c b/pd/src/g_io.c
index eb4263d0..6c173c27 100644
--- a/pd/src/g_io.c
+++ b/pd/src/g_io.c
@@ -217,10 +217,13 @@ void vinlet_dspprolog(struct _vinlet *x, t_signal **parentsigs,
(x->x_hop - prologphase * re_parentvecsize);
if (upsample * downsample == 1)
- dsp_add(vinlet_doprolog, 3, x, insig->s_vec, re_parentvecsize);
+ dsp_add(vinlet_doprolog, 3, x, insig->s_vec,
+ re_parentvecsize);
else {
- resamplefrom_dsp(&x->x_updown, insig->s_vec, parentvecsize, re_parentvecsize, x->x_updown.method);
- dsp_add(vinlet_doprolog, 3, x, x->x_updown.s_vec, re_parentvecsize);
+ resamplefrom_dsp(&x->x_updown, insig->s_vec, parentvecsize,
+ re_parentvecsize, x->x_updown.method);
+ dsp_add(vinlet_doprolog, 3, x, x->x_updown.s_vec,
+ re_parentvecsize);
}
/* if the input signal's reference count is zero, we have
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index f4426ada..e76b541e 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -11,7 +11,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 40
#define PD_BUGFIX_VERSION 0
-#define PD_TEST_VERSION "test07"
+#define PD_TEST_VERSION "test08"
/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
diff --git a/pd/src/notes.txt b/pd/src/notes.txt
index 1b614645..bdf362bb 100644
--- a/pd/src/notes.txt
+++ b/pd/src/notes.txt
@@ -1,4 +1,6 @@
---------------- dolist --------------------
+check bug reports on sourceforge
+PC device counting problem (first device invoked by -audiodev 0)
test:
compile on various versions of linux
@@ -13,30 +15,6 @@ what does OSX do when jack is compiled into Pd but not installed??
turn on paMacCore_ChangeDeviceParameters for mac (pa_mac_core.h)
Gnome: why don't windows pop up when clicked on?
-doc:
-declare help window
-openpanel directory
-big-soundfile support
-escaping filenames for wierdly named externs
-infrastructure for adding externs in non-ascii languages
-'$' patch (multiple dollar-sign expansion)
--x flag for curves
-object list
-document env~ second argument (and why is it no less than 1/10 of first???)
-vibrato example
-block resampling arguments
-document tabwrite~_start
-"list" to signal inlet (e.g., "*~") or float inlet (f) complains.
-$-expansion changed
-list length
-send inlet
-bug fix: list to numbox (inlet and object but object is noinlet)
-bug fix: pd $1 bug ($1 is saved as it was evaluated, not as '$1')
-flag to defeat .pdsettings
-'{' dropped better
-'[' in numbox label breaks it (Yury Sept. 3)
-more reasonable font size default for GUIs
-
problems:
help browser (offer both versions?)
look again at array vis/invis conundrum, g_template.c
@@ -63,8 +41,10 @@ loading e-mailed patches without removing headers crashes pd
check if _vsnprintf with zero argument in windows works any better...
detect adc~ and dac~ reblocking
+more demonstration patches:
+vibrato using variable delay
+
features:
-flag to defeat .pdsettings
externs able to usurp built-ins (+mem alignment for SSE)
replace gatom_escapit with a quoting mechanism (handle '[', spaces, etc.)
sprout inlet for "route", "sel" if one arg
@@ -165,6 +145,6 @@ fix edit mode menu item
fancier text editing
tools (reassigns meaning of primary click)
get gui to notice early EOF
-rewrite t_getbytes properly
+rewrite t_getbytes properly (m_newmemory.c in pd/attic)
obj_new should do a longjmp on out-of-memory
diff --git a/pd/src/s_audio.c b/pd/src/s_audio.c
index 086ca490..623b073b 100644
--- a/pd/src/s_audio.c
+++ b/pd/src/s_audio.c
@@ -131,9 +131,19 @@ static void audio_init( void)
void sys_setchsr(int chin, int chout, int sr)
{
int nblk;
- int inbytes = (chin ? chin : 2) * (DEFDACBLKSIZE*sizeof(float));
- int outbytes = (chout ? chout : 2) * (DEFDACBLKSIZE*sizeof(float));
+ int inbytes = (chin ? chin : 2) *
+ (DEFDACBLKSIZE*sizeof(float));
+ int outbytes = (chout ? chout : 2) *
+ (DEFDACBLKSIZE*sizeof(float));
+ if (sys_soundin)
+ freebytes(sys_soundin,
+ (sys_inchannels? sys_inchannels : 2) *
+ (DEFDACBLKSIZE*sizeof(float)));
+ if (sys_soundout)
+ freebytes(sys_soundout,
+ (sys_outchannels? sys_outchannels : 2) *
+ (DEFDACBLKSIZE*sizeof(float)));
sys_inchannels = chin;
sys_outchannels = chout;
sys_dacsr = sr;
@@ -141,14 +151,10 @@ void sys_setchsr(int chin, int chout, int sr)
if (sys_advance_samples < 3 * DEFDACBLKSIZE)
sys_advance_samples = 3 * DEFDACBLKSIZE;
- if (sys_soundin)
- free(sys_soundin);
- sys_soundin = (t_float *)malloc(inbytes);
+ sys_soundin = (t_float *)getbytes(inbytes);
memset(sys_soundin, 0, inbytes);
- if (sys_soundout)
- free(sys_soundout);
- sys_soundout = (t_float *)malloc(outbytes);
+ sys_soundout = (t_float *)getbytes(outbytes);
memset(sys_soundout, 0, outbytes);
if (sys_verbose)
@@ -654,12 +660,12 @@ void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
audio_getdevs(indevlist, &nindevs, outdevlist, &noutdevs, &canmulti,
MAXNDEV, DEVDESCSIZE);
- sys_gui("set audio_indevlist {}\n");
+ sys_gui("global audio_indevlist; set audio_indevlist {}\n");
for (i = 0; i < nindevs; i++)
sys_vgui("lappend audio_indevlist \"%s\"\n",
indevlist + i * DEVDESCSIZE);
- sys_gui("set audio_outdevlist {}\n");
+ sys_gui("global audio_outdevlist; set audio_outdevlist {}\n");
for (i = 0; i < noutdevs; i++)
sys_vgui("lappend audio_outdevlist \"%s\"\n",
outdevlist + i * DEVDESCSIZE);
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index 8c745dc4..dd4e7cb7 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -249,7 +249,7 @@ static void pd_makeversion(void)
char foo[100];
sprintf(foo, "Pd version %d.%d-%d%s\n",PD_MAJOR_VERSION,
PD_MINOR_VERSION,PD_BUGFIX_VERSION,PD_TEST_VERSION);
- pd_version = malloc(strlen(foo+1));
+ pd_version = malloc(strlen(foo)+1);
strcpy(pd_version, foo);
}
@@ -859,7 +859,7 @@ int sys_argparse(int argc, char **argv)
argc -= 2; argv += 2;
}
else if (!strcmp(*argv, "-noprefs")) /* did this earlier */
- ;
+ argc--, argv++;
else
{
unsigned int i;
@@ -972,8 +972,8 @@ static void sys_afterargparse(void)
advance = sys_main_advance;
if (sys_main_srate)
rate = sys_main_srate;
- sys_open_audio(naudioindev, audioindev, naudioindev, chindev,
- naudiooutdev, audiooutdev, naudiooutdev, choutdev, rate, advance, 0);
+ sys_open_audio(naudioindev, audioindev, nchindev, chindev,
+ naudiooutdev, audiooutdev, nchoutdev, choutdev, rate, advance, 0);
sys_open_midi(nmidiindev, midiindev, nmidioutdev, midioutdev, 0);
}
diff --git a/pd/src/s_midi.c b/pd/src/s_midi.c
index 936fb282..12c31258 100644
--- a/pd/src/s_midi.c
+++ b/pd/src/s_midi.c
@@ -653,12 +653,12 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
midi_getdevs(indevlist, &nindevs, outdevlist, &noutdevs,
MAXNDEV, DEVDESCSIZE);
- sys_gui("set midi_indevlist {none}\n");
+ sys_gui("global midi_indevlist; set midi_indevlist {none}\n");
for (i = 0; i < nindevs; i++)
sys_vgui("lappend midi_indevlist \"%s\"\n",
indevlist + i * DEVDESCSIZE);
- sys_gui("set midi_outdevlist {none}\n");
+ sys_gui("global midi_outdevlist; set midi_outdevlist {none}\n");
for (i = 0; i < noutdevs; i++)
sys_vgui("lappend midi_outdevlist \"%s\"\n",
outdevlist + i * DEVDESCSIZE);