aboutsummaryrefslogtreecommitdiff
path: root/puredata
diff options
context:
space:
mode:
authorTom Schouten <doelie@users.sourceforge.net>2006-09-01 13:45:31 +0000
committerTom Schouten <doelie@users.sourceforge.net>2006-09-01 13:45:31 +0000
commit7591a024f184bd385d35583d19d86c1d5f2531ba (patch)
tree77aa0c44ccb700eb9a2b16e1b246e3c8026c40ed /puredata
parent91dd6b68f0f209ad015a303095bb1df018dca71e (diff)
pdp current darcs merge
svn path=/trunk/externals/pdp/; revision=5816
Diffstat (limited to 'puredata')
-rw-r--r--puredata/pdp_comm.c17
-rw-r--r--puredata/pdp_queue.c10
2 files changed, 21 insertions, 6 deletions
diff --git a/puredata/pdp_comm.c b/puredata/pdp_comm.c
index 4c67659..2674e36 100644
--- a/puredata/pdp_comm.c
+++ b/puredata/pdp_comm.c
@@ -116,12 +116,16 @@ void
pdp_packet_pass_if_valid(t_outlet *outlet, int *packet_ptr)
{
+
+
t_pdp *header = pdp_packet_header(*packet_ptr);
if (header){
+
/* send register phase */
outlet_pdp_register(outlet, *packet_ptr);
+
/* unregister */
pdp_packet_mark_unused(*packet_ptr);
*packet_ptr = -1;
@@ -129,7 +133,9 @@ pdp_packet_pass_if_valid(t_outlet *outlet, int *packet_ptr)
/* send process phase */
outlet_pdp_process(outlet);
+
}
+
}
void
@@ -317,7 +323,7 @@ void pd_atom_to_pdp_atom(t_atom *pdatom, t_pdp_atom *pdpatom)
}
}
-
+#if PDP_SYMBOL_HACK
/* some "accelerated" pd symbols */
t_symbol s_pdp = {"pdp", 0, 0};
@@ -329,6 +335,8 @@ t_symbol s_inspect = {"inspect", 0, 0};
t_symbol s_accumulate = {"accumulate", 0, 0};
t_symbol s_chanmask = {"chanmask", 0, 0};
+
+
// internal pd method
t_symbol *dogensym(char *s, t_symbol *oldsym);
static void _addsym(t_symbol *s)
@@ -345,6 +353,7 @@ static void _addsym(t_symbol *s)
}
}
+
void
pdp_pdsym_setup(void)
{
@@ -360,6 +369,12 @@ pdp_pdsym_setup(void)
}
+#else
+
+void pdp_pdsym_setup(void){
+}
+
+#endif
#ifdef __cplusplus
diff --git a/puredata/pdp_queue.c b/puredata/pdp_queue.c
index b66289a..f5a9d65 100644
--- a/puredata/pdp_queue.c
+++ b/puredata/pdp_queue.c
@@ -79,10 +79,10 @@ void pdp_procqueue_wait(t_pdp_procqueue *q)
D post("pdp_procqueue_wait(%x): pdp_procqueue_thread has finished processing", q);
}
-void pdp_procqueue_finish(t_pdp_procqueue *q, int index)
+void pdp_procqueue_finish(t_pdp_procqueue *q, int indx)
{
- if (-1 == index) {
+ if (-1 == indx) {
//post("pdp_pq_remove: index == -1");
return;
}
@@ -90,8 +90,8 @@ void pdp_procqueue_finish(t_pdp_procqueue *q, int index)
pdp_procqueue_wait(q);
/* invalidate callback at index */
- q->q[index & q->mask].x_callback = 0;
- q->q[index & q->mask].x_queue_id = 0;
+ q->q[indx & q->mask].x_callback = 0;
+ q->q[indx & q->mask].x_queue_id = 0;
}
@@ -364,7 +364,7 @@ t_pdp_procqueue *pdp_queue_get_queue(void){return &pdp_queue;}
#if 1
/* default pdp queue shortcut methods */
void pdp_queue_wait() {pdp_procqueue_wait(&pdp_queue);}
-void pdp_queue_finish(int index) { pdp_procqueue_finish(&pdp_queue, index);}
+void pdp_queue_finish(int indx) { pdp_procqueue_finish(&pdp_queue, indx);}
void pdp_queue_add(void *owner, void *process, void *callback, int *queue_id) {
pdp_procqueue_add(&pdp_queue, owner, process, callback, queue_id);
}