aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/pdp_comm.h25
-rw-r--r--include/pdp_config.h4
-rw-r--r--include/pdp_list.h2
-rw-r--r--include/pdp_mem.h1
-rw-r--r--include/pdp_net.h2
-rw-r--r--include/pdp_packet.h5
-rw-r--r--include/pdp_post.h18
-rw-r--r--include/pdp_queue.h2
-rw-r--r--include/pdp_types.h15
9 files changed, 62 insertions, 12 deletions
diff --git a/include/pdp_comm.h b/include/pdp_comm.h
index bd6cab8..7932e1d 100644
--- a/include/pdp_comm.h
+++ b/include/pdp_comm.h
@@ -37,8 +37,17 @@ extern "C"
/* pdp's pd symbols for communication
don't use these directly!!
use the macros instead, in case
- this is proven to be too much of a hack.. */
+ this is proven to be too much of a hack..
+ it's too much of a hack. getting rid of them.
+
+ */
+
+
+#define PDP_SYMBOL_HACK 0
+
+
+#if PDP_SYMBOL_HACK
extern t_symbol s_pdp;
extern t_symbol s_register_ro;
extern t_symbol s_register_rw;
@@ -58,6 +67,20 @@ extern t_symbol s_chanmask;
#define S_ACCUMULATE &s_accumulate
#define S_CHANMASK &s_chanmask
+#else
+
+#define S_PDP gensym("pdp")
+#define S_REGISTER_RO gensym("register_ro")
+#define S_REGISTER_RW gensym("register_rw")
+#define S_PROCESS gensym("process")
+#define S_DPD gensym("dpd")
+#define S_INSPECT gensym("inspect")
+#define S_ACCUMULATE gensym("accumulate")
+#define S_CHANMASK gensym("chanmask")
+
+
+#endif
+
/* utility methods */
diff --git a/include/pdp_config.h b/include/pdp_config.h
index 74274e2..7d93a9f 100644
--- a/include/pdp_config.h
+++ b/include/pdp_config.h
@@ -29,10 +29,10 @@
/* #undef HAVE_PDP_READLINE */
/* build pdp_sdl */
-/* #undef HAVE_PDP_SDL */
+#define HAVE_PDP_SDL 1
/* build pdp_v4l */
-/* #undef HAVE_PDP_V4L */
+#define HAVE_PDP_V4L 1
/* experimental vforth dsp engine */
/* #undef HAVE_PDP_VFORTH */
diff --git a/include/pdp_list.h b/include/pdp_list.h
index 2f7b8f5..3d55593 100644
--- a/include/pdp_list.h
+++ b/include/pdp_list.h
@@ -179,7 +179,7 @@ void pdp_list_add_back_atom(t_pdp_list *l, t_pdp_atom *a);
/* these don't do error checking. out of bound == error */
t_pdp_atom *pdp_list_pop_atom (t_pdp_list *l);
t_pdp_word pdp_list_pop (t_pdp_list *l);
-t_pdp_word pdp_list_index (t_pdp_list *l, int index);
+t_pdp_word pdp_list_index (t_pdp_list *l, int indx);
void pdp_list_pop_push (t_pdp_list *source, t_pdp_list *dest);
/* some aliases */
diff --git a/include/pdp_mem.h b/include/pdp_mem.h
index 3301655..00141e4 100644
--- a/include/pdp_mem.h
+++ b/include/pdp_mem.h
@@ -29,7 +29,6 @@ void pdp_dealloc(void *stuff);
/* fast allocator object (for lists and atoms) */
-#define PDP_FASTALLOC_BLOCK_ELEMENTS 4096
typedef struct _pdp_fastalloc
{
unsigned int atom_size;
diff --git a/include/pdp_net.h b/include/pdp_net.h
index 9e638c4..4f775c6 100644
--- a/include/pdp_net.h
+++ b/include/pdp_net.h
@@ -114,7 +114,7 @@ typedef struct _pdp_udp_receiver
unsigned int x_data_size;
void *x_data;
struct sockaddr_in x_source_socket;
- int x_sslen;
+ socklen_t x_sslen;
int x_receive_finished;
int x_packet_transferred;
diff --git a/include/pdp_packet.h b/include/pdp_packet.h
index f944095..234024d 100644
--- a/include/pdp_packet.h
+++ b/include/pdp_packet.h
@@ -49,12 +49,15 @@
The interface to the packet manager contains the following managing methods:
- * pdp_packet_new: create a new packet or reuse a previous one
+ * pdp_packet_create: create a new packet
* pdp_packet_mark_unused: release a packet
* pdp_packet_copy_ro: register a packet for read only use
* pdp_packet_copy_rw: register a packet for read/write use (this creates a copy if necessary)
* pdp_packet_clone_rw: create a new packet using a template, but don't copy the data
+ ( some types have shortcut methods pdp_packet_new_ which create/reuse a packet
+ unless you are writing a factory method for a packet, you should NEVER call a _create method )
+
And two methods for raw data access
* pdp_packet_header: retreive the header of the packet
diff --git a/include/pdp_post.h b/include/pdp_post.h
index 05b5143..1054388 100644
--- a/include/pdp_post.h
+++ b/include/pdp_post.h
@@ -22,8 +22,22 @@
#ifndef _PDP_POST_H_
#define _PDP_POST_H_
+#include <stdarg.h>
+#include <m_pd.h>
+
/* write a message to log (console) */
-void pdp_post_n(char *fmt, ...);
-void pdp_post(char *fmt, ...);
+
+#include <m_pd.h>
+
+// old
+//void pdp_post_n(char *fmt, ...);
+//void pdp_post(char *fmt, ...);
+
+// new
+//void startpost(const char *fmt, ...);
+//void post(const char *fmt, ...);
+
+#define pdp_post_n startpost
+#define pdp_post post
#endif
diff --git a/include/pdp_queue.h b/include/pdp_queue.h
index eeffd2e..b4d19be 100644
--- a/include/pdp_queue.h
+++ b/include/pdp_queue.h
@@ -82,7 +82,7 @@ int pdp_procqueue_full(t_pdp_procqueue *q);
void pdp_procqueue_flush(t_pdp_procqueue *q);
void pdp_procqueue_wait(t_pdp_procqueue *q);
-void pdp_procqueue_finish(t_pdp_procqueue *q, int index);
+void pdp_procqueue_finish(t_pdp_procqueue *q, int indx);
void pdp_procqueue_add(t_pdp_procqueue *q, void *owner, void *process, void *callback, int *queue_id);
void pdp_procqueue_use_thread(t_pdp_procqueue* q, int t);
void pdp_procqueue_init(t_pdp_procqueue *q, double milliseconds, int logsize);
diff --git a/include/pdp_types.h b/include/pdp_types.h
index b021dd7..767a937 100644
--- a/include/pdp_types.h
+++ b/include/pdp_types.h
@@ -24,14 +24,25 @@
#ifndef PDP_TYPES_H
#define PDP_TYPES_H
+/* check
+ http://www.unix.org/whitepapers/64bit.html
+ on unix (LP64) int = 32bit
+
+ it was like this:
+
+ typedef signed long s32;
+ typedef unsigned long u32;
+*/
+
+
typedef signed char s8;
typedef signed short s16;
-typedef signed long s32;
+typedef signed int s32;
typedef signed long long s64;
typedef unsigned char u8;
typedef unsigned short u16;
-typedef unsigned long u32;
+typedef unsigned int u32;
typedef unsigned long long u64;