aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <sevyves@users.sourceforge.net>2004-03-30 04:18:55 +0000
committerN.N. <sevyves@users.sourceforge.net>2004-03-30 04:18:55 +0000
commitd3ee59e709bbc51fea444584fed70c7fb084fd45 (patch)
treecb64aba584fe510ddf62a8a7b7cd00b7e39d56d9
parent30809d41b8499bcb12d1245f1b34ec25eb8de2dc (diff)
sonogram 0.12
svn path=/trunk/externals/unauthorized/; revision=1515
-rw-r--r--sonogram~/CHANGES.LOG2
-rw-r--r--sonogram~/help-sonogram~.pd10
-rw-r--r--sonogram~/help-sonograph~.pd10
-rw-r--r--sonogram~/sonogram~.c21
4 files changed, 30 insertions, 13 deletions
diff --git a/sonogram~/CHANGES.LOG b/sonogram~/CHANGES.LOG
index 64161e7..c40ae6a 100644
--- a/sonogram~/CHANGES.LOG
+++ b/sonogram~/CHANGES.LOG
@@ -1,3 +1,5 @@
+0.12
+ adapted for pd 0.37
0.11
allow backwards reading
0.10
diff --git a/sonogram~/help-sonogram~.pd b/sonogram~/help-sonogram~.pd
new file mode 100644
index 0000000..ab00898
--- /dev/null
+++ b/sonogram~/help-sonogram~.pd
@@ -0,0 +1,10 @@
+#N canvas 0 1 450 300 10;
+#X obj 134 93 rs-sonogram~;
+#X text 193 27 To work properly \, the block size;
+#X text 193 39 has to be redefined.;
+#X msg 291 89 \; pd dsp 1;
+#X msg 356 90 \; pd dsp 0;
+#X text 193 51 that's why everything is in the subpatch.;
+#X obj 132 130 dac~;
+#X connect 0 0 6 0;
+#X connect 0 0 6 1;
diff --git a/sonogram~/help-sonograph~.pd b/sonogram~/help-sonograph~.pd
new file mode 100644
index 0000000..4352c3d
--- /dev/null
+++ b/sonogram~/help-sonograph~.pd
@@ -0,0 +1,10 @@
+#N canvas 0 0 450 300 10;
+#X obj 134 93 rs-sonograph~;
+#X text 193 27 To work properly \, the block size;
+#X text 193 39 has to be redefined.;
+#X obj 132 130 dac~;
+#X msg 291 89 \; pd dsp 1;
+#X msg 356 90 \; pd dsp 0;
+#X text 193 51 that's why everything is in the subpatch.;
+#X connect 0 0 3 0;
+#X connect 0 0 3 1;
diff --git a/sonogram~/sonogram~.c b/sonogram~/sonogram~.c
index 8c1d989..a0b8472 100644
--- a/sonogram~/sonogram~.c
+++ b/sonogram~/sonogram~.c
@@ -37,9 +37,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
-#ifndef MACOSX
#include <malloc.h>
-#endif
#include <ctype.h>
#include <pthread.h>
#ifdef UNIX
@@ -98,7 +96,7 @@ static int ignorevisible=1; // ignore visible test
#define THREAD_SLEEP_TIME 100000 // 100000 us = 100 ms
-static char *sonogram_version = "sonogram~: version 0.11, written by Yves Degoyon (ydegoyon@free.fr)";
+static char *sonogram_version = "sonogram~: version 0.12, written by Yves Degoyon (ydegoyon@free.fr)";
static t_class *sonogram_class;
t_widgetbehavior sonogram_widgetbehavior;
@@ -2018,6 +2016,7 @@ void sonogram_tilde_setup(void)
post(sonogram_version);
sonogram_class = class_new(gensym("sonogram~"), (t_newmethod)sonogram_new, (t_method)sonogram_free,
sizeof(t_sonogram), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_sethelpsymbol( sonogram_class, gensym("sonogram~.pd") );
// set callbacks
sonogram_widgetbehavior.w_getrectfn = sonogram_getrect;
@@ -2027,18 +2026,14 @@ void sonogram_tilde_setup(void)
sonogram_widgetbehavior.w_deletefn = sonogram_delete;
sonogram_widgetbehavior.w_visfn = sonogram_vis;
sonogram_widgetbehavior.w_clickfn = sonogram_click;
- /*
- * <hans@eds.org>: As of 0.37, pd does not have these last
- * two elements in t_widgetbehavoir anymore.
- * see pd/src/notes.txt:
- * savefunction and dialog into class structure
- */
-#if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION)
+
+
+#if PD_MINOR_VERSION >= 37
+ class_setpropertiesfn(sonogram_class, NULL);
+ class_setsavefn(sonogram_class, sonogram_save);
+#else
sonogram_widgetbehavior.w_propertiesfn = NULL;
sonogram_widgetbehavior.w_savefn = sonogram_save;
-#else
- class_setpropertiesfn(sonogram_class, NULL);
- class_setsavefn(sonogram_class, &sonogram_save);
#endif
CLASS_MAINSIGNALIN( sonogram_class, t_sonogram, x_f );