summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/pdbox/PDa/src/m_sched.c6
-rw-r--r--apps/plugins/pdbox/pdbox.c28
2 files changed, 14 insertions, 20 deletions
diff --git a/apps/plugins/pdbox/PDa/src/m_sched.c b/apps/plugins/pdbox/PDa/src/m_sched.c
index 6500fc2038..88e639d39e 100644
--- a/apps/plugins/pdbox/PDa/src/m_sched.c
+++ b/apps/plugins/pdbox/PDa/src/m_sched.c
@@ -399,7 +399,9 @@ static
#endif
void sched_tick(t_time next_sys_time)
{
+#ifndef ROCKBOX
int countdown = 5000;
+#endif
while (clock_setlist && clock_setlist->c_settime < next_sys_time)
{
t_clock *c = clock_setlist;
@@ -407,13 +409,13 @@ void sched_tick(t_time next_sys_time)
clock_unset(clock_setlist);
outlet_setstacklim();
(*c->c_fn)(c->c_owner);
+#ifndef ROCKBOX
if (!countdown--)
{
countdown = 5000;
-#ifndef ROCKBOX
sys_pollgui();
-#endif
}
+#endif
if (sys_quit)
return;
}
diff --git a/apps/plugins/pdbox/pdbox.c b/apps/plugins/pdbox/pdbox.c
index 56371af81f..cdec7a279c 100644
--- a/apps/plugins/pdbox/pdbox.c
+++ b/apps/plugins/pdbox/pdbox.c
@@ -124,7 +124,7 @@ void gui_thread(void)
/* Core thread */
void core_thread(void)
{
- /* Add the directory the called .pd resides in to lib directories. */
+ /* Add the directory the called .pd file resides in to lib directories. */
sys_findlibdir(filename);
/* Open the PD design file. */
@@ -146,7 +146,7 @@ void core_thread(void)
while(sys_send_dacs() != SENDDACS_NO)
sched_tick(sys_time + sys_time_per_dsp_tick);
- yield();
+ rb->sleep(1);
}
rb->thread_exit();
@@ -178,12 +178,8 @@ enum plugin_status plugin_start(const void* parameter)
rb->splash(HZ, "Not enough memory!");
return PLUGIN_ERROR;
}
-#if 1
+
init_memory_pool(mem_size, mem_pool);
-#endif
-#if 0
- set_memory_pool(mem_pool, mem_size);
-#endif
/* Initialize net. */
net_init();
@@ -207,6 +203,12 @@ enum plugin_status plugin_start(const void* parameter)
DEFAULTADVANCE, /* Scheduler advance */
1 /* Enable */);
+ /* Initialize scheduler time variables. */
+ sys_time = 0;
+ sys_time_per_dsp_tick = (TIMEUNITPERSEC) *
+ ((double) sys_schedblocksize) / sys_dacsr;
+
+
/* Create stacks for threads. */
core_stack = getbytes(CORESTACKSIZE);
gui_stack = getbytes(GUISTACKSIZE);
@@ -242,12 +244,6 @@ enum plugin_status plugin_start(const void* parameter)
if(core_thread_id == 0 || gui_thread_id == 0)
return PLUGIN_ERROR;
- /* Initialize scheduler time variables. */
- sys_time = 0;
- sys_time_per_dsp_tick = (TIMEUNITPERSEC) *
- ((double) sys_schedblocksize) / sys_dacsr;
-
-
/* Main loop. */
while(!quit)
{
@@ -272,12 +268,8 @@ enum plugin_status plugin_start(const void* parameter)
net_destroy();
/* Clear memory pool. */
-#if 1
destroy_memory_pool(mem_pool);
-#endif
-#if 0
- clear_memory_pool();
-#endif
return PLUGIN_OK;
}
+